Changes In Branch feature/web2py_auth Excluding Merge-Ins
This is equivalent to a diff from b33aaf3ac3 to 0a19da60e0
2011-11-20
| ||
13:37 | Merged in support for a real auth system, not a one-user DB kludge check-in: 57cc1847b3 user: spiffy tags: develop | |
13:31 | Fixed bug that kept login form from working on non-localhost (turns out web2py 1.96.1 disabled generic views for other hosts) Closed-Leaf check-in: 0a19da60e0 user: spiffy tags: feature/web2py_auth | |
05:28 | Upgraded to web2py 1.99.2 check-in: 5e6e1e2c0a user: spiffy tags: feature/web2py_auth | |
03:42 | Merged in change from branch develop that fixes the app check-in: a162dcef14 user: spiffy tags: feature/web2py_auth | |
03:41 | Removed web2py import calls from the Newsblur module check-in: b33aaf3ac3 user: spiffy tags: develop | |
03:12 | Added a button to mark a feed as read check-in: b74e6c434b user: spiffy tags: develop | |
Modified Makefile
from [72d1f69846]
to [33942ab9ac].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + + + + + - + | clean: rm -f httpserver.log rm -f parameters*.py rm -f -r applications/*/compiled find ./ -name '*~' -exec rm -f {} \; find ./ -name '*.orig' -exec rm -f {} \; find ./ -name '*.rej' -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 update: wget -O gluon/contrib/feedparser.py http://feedparser.googlecode.com/svn/trunk/feedparser/feedparser.py wget -O gluon/contrib/simplejsonrpc.py http://rad2py.googlecode.com/hg/ide2py/simplejsonrpc.py src: |
︙ | |||
46 47 48 49 50 51 52 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - + | 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' |
︙ | |||
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | + + + + | 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 . pip: # create Web2py distribution for upload to Pypi # after upload clean Web2py sources with rm -R ./dist python setup.py sdist 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 |
Modified README
from [b3e52ddfca]
to [6434318c11].
︙ | |||
1119 1120 1121 1122 1123 1124 1125 | 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 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | - 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 **** |
Modified VERSION
from [2164f2cc2a]
to [822b08660f].
| 1 | - + |
|
Modified __init__.py
from [adc83b19e7]
to [7c338ed284].
|
Modified anyserver.py
from [b44d99a317]
to [10139316d2].
1 2 3 4 5 6 7 8 9 10 11 | 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 -*- """ 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. """ |
︙ | |||
128 129 130 131 132 133 134 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + | 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) |
︙ | |||
184 185 186 187 188 189 190 191 192 193 | 289 290 291 292 293 294 295 296 297 298 299 300 | + + | '--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() |
Modified appengine_config.py
from [72d08f192b]
to [ca79cefe48].
1 2 3 4 | 1 2 3 4 5 | + | def webapp_add_wsgi_middleware(app): from google.appengine.ext.appstats import recording app = recording.appstats_wsgi_middleware(app) return app |
Added applications/admin/controllers/debug.py version [462582b868].
Modified applications/admin/controllers/default.py
from [a84fa2354b]
to [8dabb76ea1].
︙ | |||
584 585 586 587 588 589 590 | 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 | - - + + | return 'normal' if item[0] == '+': return 'plus' if item[0] == '-': return 'minus' if request.vars: |
︙ | |||
706 707 708 709 710 711 712 | 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 | - - + + | 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 |
︙ | |||
1188 1189 1190 1191 1192 1193 1194 | 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | - + | def update_languages(): """ Update available languages """ app = get_app() update_all_languages(apath(app, r=request)) session.flash = T('Language files (static strings) updated') |
︙ | |||
1213 1214 1215 1216 1217 1218 1219 | 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 | - - - + + + + | 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(): |
Modified applications/admin/controllers/wizard.py
from [60791b7dca]
to [0948ae43fd].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + + - + + - + + - + - + | ('email_server','localhost'), ('email_sender','you@example.com'), ('email_login',''), ('login_method','local'), ('login_config',''), ('plugins',[])], 'tables':['auth_user'], |
︙ | |||
116 117 118 119 120 121 122 | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | - - - + + + + + + - - - - - + + + + + | 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): |
︙ | |||
162 163 164 165 166 167 168 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | - + + | except RuntimeError: response.flash=T('invalid circual reference') else: if n<m-1: redirect(URL('step3',args=n+1)) else: redirect(URL('step4')) |
︙ | |||
187 188 189 190 191 192 193 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - + + | 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,[]), |
︙ | |||
247 248 249 250 251 252 253 | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | - - - + + - - + + | 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 |
︙ | |||
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 | - - - - - + - - - - - - - + + + + + - - - - - - - + + - + - | s+=', notnull=True' if 'unique' in has: s+=', unique=True' if ftype=='boolean' and 'true' in has: s+=",\n default=True" ### determine field representation |
︙ | |||
388 389 390 391 392 393 394 | 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 | - - - - - - - + + + + + + + - - - - - - - + + + + + + + + - - + + - - - - - + + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | 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): |
︙ | |||
587 588 589 590 591 592 593 | 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | - + - - | 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) |
︙ |
Modified applications/admin/languages/af.py
from [6394eb18fe]
to [bd52361611].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + - - - + + + - + - + - + - - + + - + - + - + - - + + - - + + - + | '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', |
︙ |
Modified applications/admin/languages/bg-bg.py
from [7882283c41]
to [601bc68396].
︙ | |||
114 115 116 117 118 119 120 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + | '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', |
︙ |
Modified applications/admin/languages/de-de.py
from [d326e7c06f]
to [bf622518f4].
︙ | |||
167 168 169 170 171 172 173 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - + | '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', |
︙ | |||
317 318 319 320 321 322 323 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | - + | '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', |
︙ |
Modified applications/admin/languages/es-es.py
from [677aa3fba3]
to [d1dd79cd61].
︙ | |||
126 127 128 129 130 131 132 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | - + - + - + - + - + - + - + - + - + - + - - - + + + - + - + | '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', |
︙ | |||
261 262 263 264 265 266 267 | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - + | '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', |
︙ |
Modified applications/admin/languages/fr-fr.py
from [ed6f3ea1be]
to [d60ffd84cf].
︙ | |||
114 115 116 117 118 119 120 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + | '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', |
︙ |
Modified applications/admin/languages/he.py
from [f3c994794b]
to [bd2f6646ae].
︙ | |||
109 110 111 112 113 114 115 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + | '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': 'כן', |
︙ |
Modified applications/admin/languages/it-it.py
from [f838859834]
to [c3780eb0f5].
︙ | |||
109 110 111 112 113 114 115 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + | 'Use an url:': 'Use an url:', 'Version': 'Versione', 'View': 'Vista', 'Views': 'viste', 'Welcome %s': 'Benvenuto %s', 'Welcome to web2py': 'Benvenuto su web2py', 'YES': 'SI', |
︙ |
Modified applications/admin/languages/it.py
from [bef6439651]
to [22dede2011].
︙ | |||
111 112 113 114 115 116 117 | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + | 'Use an url:': 'Use an url:', 'Version': 'Versione', 'View': 'Vista', 'Views': 'viste', 'Welcome %s': 'Benvenuto %s', 'Welcome to web2py': 'Benvenuto su web2py', 'YES': 'SI', |
︙ |
Modified applications/admin/languages/pl-pl.py
from [4ff0dcf09e]
to [976920b9f2].
︙ | |||
106 107 108 109 110 111 112 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + | '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', |
︙ |
Modified applications/admin/languages/pl.py
from [83ac10247b]
to [e76386ce5d].
︙ | |||
114 115 116 117 118 119 120 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + | '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', |
︙ |
Modified applications/admin/languages/pt-br.py
from [33973b63ad]
to [e7d40b797d].
︙ | |||
147 148 149 150 151 152 153 | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 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 | - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - + - + | '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', |
︙ |
Modified applications/admin/languages/zh-cn.py
from [d9ae1038f2]
to [f5e338d3a7].
︙ | |||
132 133 134 135 136 137 138 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + - + - - + + - + - + - + - + - + - + - + - + - - - + + + - + - + - + | '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': '是', |
︙ | |||
269 270 271 272 273 274 275 | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + | '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': '反选全部', |
︙ |
Modified applications/admin/languages/zh-tw.py
from [599934d534]
to [fc47a55de9].
︙ | |||
143 144 145 146 147 148 149 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - + - + - + - + - + - + - + - + - + - + - - - + + + - + - + | 'Verify Password': '驗證密碼', 'Version': '版本', 'View': '視圖', 'Views': '視圖', 'Welcome %s': '歡迎 %s', 'Welcome to web2py': '歡迎使用 web2py', 'YES': '是', |
︙ | |||
280 281 282 283 284 285 286 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | - + | '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': '全不選', |
︙ |
Modified applications/admin/models/menu.py
from [cbe8ab5af6]
to [3ef86ec614].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + - + - + - + - - + - + - + + - - + + + | # ########################################################### # ## generate menu # ########################################################### _a = request.application _c = request.controller _f = request.function response.title = '%s %s' % (_f, '/'.join(request.args)) response.subtitle = 'admin' |
Modified applications/admin/static/js/jquery.js
from [7622c9ac23]
to [0cf62d1dd0].
cannot compute difference between binary files
Modified applications/admin/static/js/web2py_ajax.js
from [7f2851f561]
to [afc700bdca].
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - + | 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'); |
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + | 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')) |
︙ |
Modified applications/admin/views/default/about.html
from [f977b1a453]
to [b342dc744a].
1 2 3 4 5 6 | 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> |
Modified applications/admin/views/default/design.html
from [f9b44e4321]
to [bb614a9671].
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 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'}} {{ 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): |
︙ |
Modified applications/admin/views/default/peek.html
from [ac2e58d0d6]
to [9463c1f29b].
1 2 3 4 5 6 7 8 | 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'))}} |
Modified applications/admin/views/default/plugin.html
from [084d2364cc]
to [695b8c8c14].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + - + | {{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): |
︙ |
Modified applications/admin/views/default/site.html
from [f3096ca1c3]
to [296a772366].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | - + - + - - - + + + - + - + - + - + - + - + - + + - + - + - + | <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):}} |
︙ | |||
111 112 113 114 115 116 117 | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - + - + - + - + | <td> <input id="file" name="file" type="file" id="upload_file" /> <b>OR</b> </td> </tr> <tr> <td> |
Modified applications/admin/views/layout.html
from [c4facc28a3]
to [8713b04ead].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + | <div id="main"> <div id="main_inner"> <div class="flash">{{=response.flash or ''}}</div> {{include}} </div> </div> <div id="footer" class="fixed"> |
︙ |
Modified applications/admin/views/wizard/step.html
from [0b95247d7c]
to [3ab784f285].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - + - + | <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> |
︙ |
Deleted applications/examples/ABOUT version [ea96ed160b].
Deleted applications/examples/LICENSE version [4719a3b620].
Deleted applications/examples/__init__.py version [da39a3ee5e].
Deleted applications/examples/controllers/ajax_examples.py version [c86cb0618f].
Deleted applications/examples/controllers/appadmin.py version [1eb6fe022d].
Deleted applications/examples/controllers/database_examples.py version [d7a27016aa].
Deleted applications/examples/controllers/default.py version [d78f059886].
Deleted applications/examples/controllers/form_examples.py version [89768d6d15].
Deleted applications/examples/controllers/global.py version [7b13545222].
Deleted applications/examples/controllers/layout_examples.py version [7591b93b83].
Deleted applications/examples/controllers/session_examples.py version [83a6e5ca77].
Deleted applications/examples/controllers/simple_examples.py version [4082840564].
Deleted applications/examples/controllers/spreadsheet.py version [9142324704].
Deleted applications/examples/controllers/template_examples.py version [0afc3bbead].
Deleted applications/examples/models/db.py version [04002207a9].
Deleted applications/examples/models/feeds_reader.py version [cd96873e70].
Deleted applications/examples/models/markmin.py version [4d602f756d].
Deleted applications/examples/models/menu.py version [e8143d44af].
Deleted applications/examples/private/content/en/default/documentation/community.markmin version [95b4ce4ac6].
Deleted applications/examples/private/content/en/default/documentation/main.markmin version [cca528997e].
Deleted applications/examples/private/content/en/default/documentation/more.markmin version [07e3a74e83].
Deleted applications/examples/private/content/en/default/documentation/official.markmin version [211d236d62].
Deleted applications/examples/private/content/en/default/index/maincontent.markmin version [a65187fd5d].
Deleted applications/examples/private/content/en/default/index/whyweb2py.markmin version [d28d0c3ed9].
Deleted applications/examples/private/content/en/default/usergroups/grouplist.markmin version [0dc9361e64].
Deleted applications/examples/static/artwork.tar.gz version [29e1ed6f71].
Deleted applications/examples/static/bg.gif version [06957bce5d].
Deleted applications/examples/static/bg.png version [7047b59774].
Deleted applications/examples/static/css/artwork.css version [184a8c1dc1].
Deleted applications/examples/static/css/calendar.css version [be94f02d8c].
Deleted applications/examples/static/css/home.css version [e27ddc442c].
Deleted applications/examples/static/css/menu.css version [796415f51c].
Deleted applications/examples/static/epydoc/api-objects.txt version [07835d23e8].
Deleted applications/examples/static/epydoc/class-tree.html version [ba68f0f97c].
Deleted applications/examples/static/epydoc/crarr.png version [bcc1196f30].
Deleted applications/examples/static/epydoc/datetime.date-class.html version [f4d4483ada].
Deleted applications/examples/static/epydoc/datetime.time-class.html version [9e509d7714].
Deleted applications/examples/static/epydoc/epydoc.css version [586d28cf53].
Deleted applications/examples/static/epydoc/epydoc.js version [9f477dc176].
Deleted applications/examples/static/epydoc/frames.html version [551171ca4e].
Deleted applications/examples/static/epydoc/help.html version [ab544c3828].
Deleted applications/examples/static/epydoc/identifier-index.html version [0a2be90a87].
Deleted applications/examples/static/epydoc/index.html version [551171ca4e].
Deleted applications/examples/static/epydoc/module-tree.html version [c599e47485].
Deleted applications/examples/static/epydoc/psycopg2-module.html version [26fe2ee9c5].
Deleted applications/examples/static/epydoc/psycopg2-pysrc.html version [d3e7cfc9c4].
Deleted applications/examples/static/epydoc/psycopg2.IntegrityError-class.html version [9ecedfb976].
Deleted applications/examples/static/epydoc/psycopg2.InterfaceError-class.html version [e709319c9c].
Deleted applications/examples/static/epydoc/psycopg2.NotSupportedError-class.html version [1f2478371d].
Deleted applications/examples/static/epydoc/psycopg2.OperationalError-class.html version [608497a402].
Deleted applications/examples/static/epydoc/psycopg2.ProgrammingError-class.html version [6c4dff9c05].
Deleted applications/examples/static/epydoc/psycopg2.tz-module.html version [5c4671c67e].
Deleted applications/examples/static/epydoc/psycopg2.tz-pysrc.html version [5bfdfb6ac0].
Deleted applications/examples/static/epydoc/psycopg2.tz.FixedOffsetTimezone-class.html version [3eba9aaaca].
Deleted applications/examples/static/epydoc/psycopg2.tz.LocalTimezone-class.html version [654c1e9c12].
Deleted applications/examples/static/epydoc/redirect.html version [56928789d6].
Deleted applications/examples/static/epydoc/title.png version [4ed899302f].
Deleted applications/examples/static/epydoc/toc-everything.html version [8a9b5797c5].
Deleted applications/examples/static/epydoc/toc-psycopg2-module.html version [6e8e39f6da].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.admin-module.html version [a7e715d95c].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.compileapp-module.html version [93e4a8d8be].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.contenttype-module.html version [ee8e7493ad].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.contrib.pymysql-module.html version [dce5967558].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.contrib.pymysql.constants-module.html version [475eb8ccf2].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html version [c597ca903f].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.contrib.pymysql.converters-module.html version [8395aec7ee].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.custom_import-module.html version [c00690a506].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.debug-module.html version [044eae7ecb].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.decoder-module.html version [40d4d7156f].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.fileutils-module.html version [6fd241c0d3].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.globals-module.html version [935714ef40].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.highlight-module.html version [960d2f424a].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.import_all-module.html version [33e2761ec5].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.languages-module.html version [6fcbc298a9].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.myregex-module.html version [6a946ca9dd].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.newcron-module.html version [d7b0aecedb].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.portalocker-module.html version [17809e2a47].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.reserved_sql_keywords-module.html version [79280176ff].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.restricted-module.html version [385bc2259a].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.rewrite-module.html version [6df2360817].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.rocket-module.html version [045556ff3d].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.sanitizer-module.html version [5a61ccd126].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.serializers-module.html version [4057bf45c4].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.settings-module.html version [306124ce3e].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.shell-module.html version [519c05b9fe].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.sqlhtml-module.html version [a91cf4dccb].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.storage-module.html version [dc89bdea5d].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.streamer-module.html version [d41c4b72b1].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.template-module.html version [d3ae0a8298].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.tools-module.html version [f2cc8960ba].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.utils-module.html version [b0871ad0dd].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.validators-module.html version [43d57f7c44].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.widget-module.html version [02cb1ae712].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.winservice-module.html version [618bdc4f34].
Deleted applications/examples/static/epydoc/toc-web2py.gluon.xmlrpc-module.html version [f7f520eab7].
Deleted applications/examples/static/epydoc/toc.html version [a93743e4d3].
Deleted applications/examples/static/epydoc/web2py.gluon-module.html version [0ef563c871].
Deleted applications/examples/static/epydoc/web2py.gluon-pysrc.html version [4c786500d5].
Deleted applications/examples/static/epydoc/web2py.gluon.compileapp-module.html version [0dcf560404].
Deleted applications/examples/static/epydoc/web2py.gluon.compileapp-pysrc.html version [fa5f65d8df].
Deleted applications/examples/static/epydoc/web2py.gluon.compileapp.LoadFactory-class.html version [9b8934cb63].
Deleted applications/examples/static/epydoc/web2py.gluon.compileapp.mybuiltin-class.html version [4d85223ce5].
Deleted applications/examples/static/epydoc/web2py.gluon.contenttype-module.html version [04cba23f1a].
Deleted applications/examples/static/epydoc/web2py.gluon.contenttype-pysrc.html version [1f70e68e9f].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql-module.html version [41a3a21ee7].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql-pysrc.html version [18b8580005].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.DBAPISet-class.html version [68bd4d7cc5].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.constants-module.html version [977eeabb05].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.constants-pysrc.html version [b4f0e11b91].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-module.html version [2bf8b6e0bd].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.constants.FIELD_TYPE-pysrc.html version [9a1c978d8f].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.converters-module.html version [996ec5e093].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.converters-pysrc.html version [fc4479fa6d].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.DataError-class.html version [ce29a6d9ad].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.DatabaseError-class.html version [c1d0dcc6c7].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.Error-class.html version [f786a98fc1].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.IntegrityError-class.html version [0e493dd542].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.InterfaceError-class.html version [1048eca9be].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.InternalError-class.html version [2e6096c089].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.NotSupportedError-class.html version [f170f4c50c].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.OperationalError-class.html version [4c5245a8ef].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.ProgrammingError-class.html version [a8eb2e37c9].
Deleted applications/examples/static/epydoc/web2py.gluon.contrib.pymysql.err.Warning-class.html version [556300840f].
Deleted applications/examples/static/epydoc/web2py.gluon.custom_import-module.html version [c401a77d12].
Deleted applications/examples/static/epydoc/web2py.gluon.custom_import-pysrc.html version [a03ed4d47f].
Deleted applications/examples/static/epydoc/web2py.gluon.custom_import._BaseImporter-class.html version [159e514682].
Deleted applications/examples/static/epydoc/web2py.gluon.custom_import._DateTrackerImporter-class.html version [00b9207621].
Deleted applications/examples/static/epydoc/web2py.gluon.custom_import._Web2pyDateTrackerImporter-class.html version [a2aa0dbfca].
Deleted applications/examples/static/epydoc/web2py.gluon.custom_import._Web2pyImporter-class.html version [7b8cb16291].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.BaseAdapter-class.html version [a2f1c94717].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.ConnectionPool-class.html version [56bc1749c0].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.CouchDBAdapter-class.html version [478c363b53].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.CubridAdapter-class.html version [12de98219b].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.DB2Adapter-class.html version [4684febe52].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.DatabaseStoredFile-class.html version [81f5061ea5].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.Expression-class.html version [6f4cd3eb71].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.FireBirdAdapter-class.html version [5dc9fba6a8].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.FireBirdEmbeddedAdapter-class.html version [22e07c62c5].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.GAEDecimalProperty-class.html version [a22ba41e73].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.GoogleDatastoreAdapter-class.html version [48ef4914fd].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.GoogleSQLAdapter-class.html version [d43853aa04].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.InformixAdapter-class.html version [4f0255356e].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.IngresAdapter-class.html version [03ae703d89].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.IngresUnicodeAdapter-class.html version [be5498a12e].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.JDBCPostgreSQLAdapter-class.html version [c1ba390156].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.JDBCSQLiteAdapter-class.html version [b9fbe073cc].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.MSSQL2Adapter-class.html version [34da5cced1].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.MSSQLAdapter-class.html version [3e0138748b].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.MongoDBAdapter-class.html version [78efdc3075].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.MySQLAdapter-class.html version [4488c60f3a].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.NoSQLAdapter-class.html version [de152a958e].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.OracleAdapter-class.html version [b996aa01cd].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.PostgreSQLAdapter-class.html version [44e96ba098].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.Reference-class.html version [96b4ec80fb].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.SAPDBAdapter-class.html version [b90afb4928].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.SQLALL-class.html version [b90e82234d].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.SQLCallableList-class.html version [37b88fbccd].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.SQLCustomType-class.html version [0e67e537d3].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.SQLiteAdapter-class.html version [9a6c932756].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.TeradataAdapter-class.html version [641bf6566e].
Deleted applications/examples/static/epydoc/web2py.gluon.dal.UseDatabaseStoredFile-class.html version [edea0c49ea].
Deleted applications/examples/static/epydoc/web2py.gluon.debug.Pipe-class.html version [bb56fead4a].
Deleted applications/examples/static/epydoc/web2py.gluon.fileutils-module.html version [4077d6f0a7].
Deleted applications/examples/static/epydoc/web2py.gluon.globals.Request-class.html version [1d61817dd0].
Deleted applications/examples/static/epydoc/web2py.gluon.globals.Response-class.html version [5f39c060b7].
Deleted applications/examples/static/epydoc/web2py.gluon.globals.Session-class.html version [2843b7267c].
Deleted applications/examples/static/epydoc/web2py.gluon.highlight-module.html version [0c8acf3456].
Deleted applications/examples/static/epydoc/web2py.gluon.highlight.Highlighter-class.html version [a184022da3].
Deleted applications/examples/static/epydoc/web2py.gluon.html.BEAUTIFY-class.html version [29b9d42f7a].
Deleted applications/examples/static/epydoc/web2py.gluon.html.BUTTON-class.html version [04b6110bdc].
Deleted applications/examples/static/epydoc/web2py.gluon.html.CENTER-class.html version [e3263e1c88].
Deleted applications/examples/static/epydoc/web2py.gluon.html.COLGROUP-class.html version [9a5f5114cd].
Deleted applications/examples/static/epydoc/web2py.gluon.html.EMBED-class.html version [562b01e136].
Deleted applications/examples/static/epydoc/web2py.gluon.html.FIELDSET-class.html version [3dae8c1431].
Deleted applications/examples/static/epydoc/web2py.gluon.html.IFRAME-class.html version [21c33eb3e3].
Deleted applications/examples/static/epydoc/web2py.gluon.html.INPUT-class.html version [98d72b4044].
Deleted applications/examples/static/epydoc/web2py.gluon.html.LABEL-class.html version [c6c8c8201f].
Deleted applications/examples/static/epydoc/web2py.gluon.html.LEGEND-class.html version [9af1325424].
Deleted applications/examples/static/epydoc/web2py.gluon.html.MARKMIN-class.html version [e8a1d40082].
Deleted applications/examples/static/epydoc/web2py.gluon.html.OBJECT-class.html version [37bc31528c].
Deleted applications/examples/static/epydoc/web2py.gluon.html.OPTGROUP-class.html version [d16b317279].
Deleted applications/examples/static/epydoc/web2py.gluon.html.OPTION-class.html version [ec220c7b19].
Deleted applications/examples/static/epydoc/web2py.gluon.html.SCRIPT-class.html version [b07e17418a].
Deleted applications/examples/static/epydoc/web2py.gluon.html.SELECT-class.html version [240e05e400].
Deleted applications/examples/static/epydoc/web2py.gluon.html.STYLE-class.html version [97c785cce6].
Deleted applications/examples/static/epydoc/web2py.gluon.html.TABLE-class.html version [a37ed87427].
Deleted applications/examples/static/epydoc/web2py.gluon.html.TBODY-class.html version [2d87050f29].
Deleted applications/examples/static/epydoc/web2py.gluon.html.TEXTAREA-class.html version [78dabbe178].
Deleted applications/examples/static/epydoc/web2py.gluon.html.TFOOT-class.html version [bdb5980fdc].
Deleted applications/examples/static/epydoc/web2py.gluon.html.THEAD-class.html version [711ceac1ad].
Deleted applications/examples/static/epydoc/web2py.gluon.html.TITLE-class.html version [4713aa96ff].
Deleted applications/examples/static/epydoc/web2py.gluon.html.XHTML-class.html version [18a5234b59].
Deleted applications/examples/static/epydoc/web2py.gluon.html.XmlComponent-class.html version [a967ed3e51].
Deleted applications/examples/static/epydoc/web2py.gluon.html.__TAG__-class.html version [4becefb1f6].
Deleted applications/examples/static/epydoc/web2py.gluon.html.web2pyHTMLParser-class.html version [e2ecc8b067].
Deleted applications/examples/static/epydoc/web2py.gluon.import_all-module.html version [ab566a9b0d].
Deleted applications/examples/static/epydoc/web2py.gluon.import_all-pysrc.html version [7b0dd0251d].
Deleted applications/examples/static/epydoc/web2py.gluon.languages-module.html version [b32d97ebcd].
Deleted applications/examples/static/epydoc/web2py.gluon.languages.lazyT-class.html version [608a957eab].
Deleted applications/examples/static/epydoc/web2py.gluon.languages.translator-class.html version [13b6665364].
Deleted applications/examples/static/epydoc/web2py.gluon.main.HttpServer-class.html version [092b33f577].
Deleted applications/examples/static/epydoc/web2py.gluon.newcron.Token-class.html version [9ba2119fd9].
Deleted applications/examples/static/epydoc/web2py.gluon.newcron.cronlauncher-class.html version [0f2ad75d98].
Deleted applications/examples/static/epydoc/web2py.gluon.newcron.extcron-class.html version [6f5e36ade8].
Deleted applications/examples/static/epydoc/web2py.gluon.newcron.hardcron-class.html version [9abcc7fc37].
Deleted applications/examples/static/epydoc/web2py.gluon.newcron.softcron-class.html version [0eda98b583].
Deleted applications/examples/static/epydoc/web2py.gluon.portalocker-module.html version [9831377c12].
Deleted applications/examples/static/epydoc/web2py.gluon.portalocker-pysrc.html version [752e06577e].
Deleted applications/examples/static/epydoc/web2py.gluon.reserved_sql_keywords-module.html version [3a8937131a].
Deleted applications/examples/static/epydoc/web2py.gluon.reserved_sql_keywords-pysrc.html version [acfd6e6533].
Deleted applications/examples/static/epydoc/web2py.gluon.restricted-module.html version [06ba297d7b].
Deleted applications/examples/static/epydoc/web2py.gluon.restricted-pysrc.html version [50d9c26e40].
Deleted applications/examples/static/epydoc/web2py.gluon.restricted.RestrictedError-class.html version [8cbd3440b3].
Deleted applications/examples/static/epydoc/web2py.gluon.restricted.TicketStorage-class.html version [d802399b10].
Deleted applications/examples/static/epydoc/web2py.gluon.rewrite.MapUrlIn-class.html version [894993d987].
Deleted applications/examples/static/epydoc/web2py.gluon.rewrite.MapUrlOut-class.html version [08c1f2da91].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.BadRequest-class.html version [651b63d531].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.ChunkedReader-class.html version [a3e63b2fa3].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.Connection-class.html version [ad196c58f0].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.FileWrapper-class.html version [8c90c0c649].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.Headers-class.html version [2e33dc67c8].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.Listener-class.html version [7580afb6ae].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.Monitor-class.html version [e0283ec8a4].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.NullHandler-class.html version [7d5333f4d6].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.Rocket-class.html version [33e74898b0].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.SSLError-class.html version [d2b28b62bc].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.SocketClosed-class.html version [726b4508b3].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.SocketTimeout-class.html version [cb588b8631].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.ThreadPool-class.html version [f0c9541be1].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.WSGIWorker-class.html version [e8e022554d].
Deleted applications/examples/static/epydoc/web2py.gluon.rocket.Worker-class.html version [b6709670c1].
Deleted applications/examples/static/epydoc/web2py.gluon.sanitizer-module.html version [23b78e7017].
Deleted applications/examples/static/epydoc/web2py.gluon.sanitizer.XssCleaner-class.html version [0c43de2900].
Deleted applications/examples/static/epydoc/web2py.gluon.serializers-module.html version [581c663b6c].
Deleted applications/examples/static/epydoc/web2py.gluon.serializers-pysrc.html version [96244d03e5].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.AutocompleteWidget-class.html version [e91a87be60].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.BooleanWidget-class.html version [08938972d4].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.CheckboxesWidget-class.html version [4f090369f9].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.DateWidget-class.html version [72b32f43b6].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.DatetimeWidget-class.html version [c10a4ab6e4].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.DecimalWidget-class.html version [17f96e5e6b].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.DoubleWidget-class.html version [a9be972484].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.FormWidget-class.html version [338a187a3c].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.IntegerWidget-class.html version [a62cbb9a79].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.ListWidget-class.html version [1a94f33f59].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.MultipleOptionsWidget-class.html version [f2a494bd6d].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.OptionsWidget-class.html version [9b11fe669d].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.PasswordWidget-class.html version [f1e8b8d8da].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.RadioWidget-class.html version [ae1acf17b8].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.SQLFORM-class.html version [edc7f7054d].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.SQLTABLE-class.html version [1564b6b370].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.StringWidget-class.html version [0ecfd8d20e].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.TextWidget-class.html version [36972c8e6f].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.TimeWidget-class.html version [d23e90b78a].
Deleted applications/examples/static/epydoc/web2py.gluon.sqlhtml.UploadWidget-class.html version [b0f6dd97bb].
Deleted applications/examples/static/epydoc/web2py.gluon.storage.List-class.html version [2adef8ff7c].
Deleted applications/examples/static/epydoc/web2py.gluon.storage.Messages-class.html version [6479cfbe5f].
Deleted applications/examples/static/epydoc/web2py.gluon.storage.Settings-class.html version [ea231522f4].
Deleted applications/examples/static/epydoc/web2py.gluon.storage.Storage-class.html version [3ed9ef189a].
Deleted applications/examples/static/epydoc/web2py.gluon.storage.StorageList-class.html version [05265dd36e].
Deleted applications/examples/static/epydoc/web2py.gluon.template.BlockNode-class.html version [6aecc39ca0].
Deleted applications/examples/static/epydoc/web2py.gluon.template.Content-class.html version [b5705562dd].
Deleted applications/examples/static/epydoc/web2py.gluon.template.Node-class.html version [d501b4ab8c].
Deleted applications/examples/static/epydoc/web2py.gluon.template.SuperNode-class.html version [5767e3e489].
Deleted applications/examples/static/epydoc/web2py.gluon.template.TemplateParser-class.html version [9d42f2d6b0].
Deleted applications/examples/static/epydoc/web2py.gluon.tools.Auth-class.html version [0fe1527bc2].
Deleted applications/examples/static/epydoc/web2py.gluon.tools.Crud-class.html version [d056f83bae].
Deleted applications/examples/static/epydoc/web2py.gluon.tools.Mail-class.html version [9399bb8613].
Deleted applications/examples/static/epydoc/web2py.gluon.tools.Mail.Attachment-class.html version [d687f3b0e3].
Deleted applications/examples/static/epydoc/web2py.gluon.tools.PluginManager-class.html version [89ed9f3413].
Deleted applications/examples/static/epydoc/web2py.gluon.tools.Recaptcha-class.html version [5b47346c89].
Deleted applications/examples/static/epydoc/web2py.gluon.tools.Service-class.html version [b8dda85409].
Deleted applications/examples/static/epydoc/web2py.gluon.tools.Service.JsonRpcException-class.html version [9e958ec2fc].
Deleted applications/examples/static/epydoc/web2py.gluon.validators-module.html version [73d78f5035].
Deleted applications/examples/static/epydoc/web2py.gluon.validators-pysrc.html version [55a281d17d].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.CLEANUP-class.html version [d416dac2c4].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.CRYPT-class.html version [c1b29fea74].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_ALPHANUMERIC-class.html version [2258723eba].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_DATE-class.html version [bc026fbc4d].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_DATETIME-class.html version [731336b4d9].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_DATETIME_IN_RANGE-class.html version [f4950f15af].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_DATE_IN_RANGE-class.html version [463f057d3a].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_DECIMAL_IN_RANGE-class.html version [df2914c3a1].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_EMAIL-class.html version [bba401f554].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_EMPTY_OR-class.html version [29849818be].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_EQUAL_TO-class.html version [c2b68c5868].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_EXPR-class.html version [fa286666d7].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_FLOAT_IN_RANGE-class.html version [5667043e98].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_GENERIC_URL-class.html version [82072b9c87].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_HTTP_URL-class.html version [1faacb2d20].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_IMAGE-class.html version [81c19d5d14].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_INT_IN_RANGE-class.html version [67bc87516f].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_IN_DB-class.html version [f9ee0fb36d].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_IN_SET-class.html version [9aff693eab].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_IN_SUBSET-class.html version [389d421840].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_IPV4-class.html version [cbb515ef29].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_LENGTH-class.html version [c75fdddd52].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_LIST_OF-class.html version [26a870e373].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_LOWER-class.html version [b9a3c963ad].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_MATCH-class.html version [f2f2d3dee0].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_NOT_EMPTY-class.html version [bbf8d9338b].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_NOT_IN_DB-class.html version [fbecc9eaf1].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_SLUG-class.html version [cea5b54853].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_STRONG-class.html version [13727bb29d].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_TIME-class.html version [804c06f151].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_UPLOAD_FILENAME-class.html version [8fe772013c].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_UPPER-class.html version [a47aa53cb4].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.IS_URL-class.html version [36554a2958].
Deleted applications/examples/static/epydoc/web2py.gluon.validators.Validator-class.html version [288c8a8613].
Deleted applications/examples/static/epydoc/web2py.gluon.widget.web2pyDialog-class.html version [e156c1b12b].
Deleted applications/examples/static/epydoc/web2py.gluon.winservice-module.html version [ad44be3833].
Deleted applications/examples/static/epydoc/web2py.gluon.winservice-pysrc.html version [cc36810a51].
Deleted applications/examples/static/epydoc/web2py.gluon.winservice.Service-class.html version [9f5d94f195].
Deleted applications/examples/static/epydoc/web2py.gluon.winservice.Web2pyService-class.html version [c8466002fb].
Deleted applications/examples/static/favicon.ico version [8849e0925e].
Deleted applications/examples/static/img/Menu-2.png version [582b8c90b9].
Deleted applications/examples/static/img/Stickers1.png version [1cc869aeae].
Deleted applications/examples/static/img/Stickers2.png version [0baee84b0d].
Deleted applications/examples/static/img/Stickers3.png version [219edabd06].
Deleted applications/examples/static/img/Stickers4.png version [a4569b8a88].
Deleted applications/examples/static/img/Stickers5.png version [ed683e2c0e].
Deleted applications/examples/static/img/Stickers6.png version [fe1b73261d].
Deleted applications/examples/static/img/Stickers7.png version [6916525230].
Deleted applications/examples/static/img/Stickers8.png version [a4569b8a88].
Deleted applications/examples/static/img/back-02.png version [9701d17c04].
Deleted applications/examples/static/img/back-03.png version [6503c7eff4].
Deleted applications/examples/static/img/back-04.png version [5a0138a6a3].
Deleted applications/examples/static/img/back-05.png version [add7d156f9].
Deleted applications/examples/static/img/back-R-02.png version [a171e00107].
Deleted applications/examples/static/img/demo.png version [3b18867ab1].
Deleted applications/examples/static/img/favicon.ico version [8849e0925e].
Deleted applications/examples/static/img/favicon.png version [7b090af72f].
Deleted applications/examples/static/img/gluon.png version [a0e4c56a96].
Deleted applications/examples/static/img/icons/1283522082_phone.png version [737f51280e].
Deleted applications/examples/static/img/icons/1283522094_email.png version [fbf1aad3fc].
Deleted applications/examples/static/img/icons/1283522158_login.png version [a852b7e943].
Deleted applications/examples/static/img/icons/1283522183_video.png version [9cea6af59e].
Deleted applications/examples/static/img/icons/1283522229_cv.png version [287176c0b4].
Deleted applications/examples/static/img/icons/1283523136_chat.png version [46b5eb9831].
Deleted applications/examples/static/img/icons/1283523297_email.png version [741e4535eb].
Deleted applications/examples/static/img/icons/1283523626_search.png version [57e7773dc0].
Deleted applications/examples/static/img/icons/1283524386_mobile.png version [c123654af5].
Deleted applications/examples/static/img/icons/1283524467_home.png version [c39317e9f3].
Deleted applications/examples/static/img/icons/CHAT_32x32-32.png version [f67fac2bbc].
Deleted applications/examples/static/img/icons/FILE_32x32-32.png version [30c8fa7d0d].
Deleted applications/examples/static/img/icons/FOLDER_32x32-32.png version [3afaa5d3f9].
Deleted applications/examples/static/img/icons/HELP_32x32-32.png version [61ea918c20].
Deleted applications/examples/static/img/icons/NETWORK - FOLDER OPEN_32x32-32.png version [b902a6e47e].
Deleted applications/examples/static/img/icons/TV_32x32-32.png version [b20a1ebbd9].
Deleted applications/examples/static/img/icons/appliances.png version [063b19a7d4].
Deleted applications/examples/static/img/icons/demo.png version [252d60a3a8].
Deleted applications/examples/static/img/icons/examples.png version [8754de2d2c].
Deleted applications/examples/static/img/icons/livechat.png version [5ce0fc3220].
Deleted applications/examples/static/img/icons/plugins.png version [b1c3a150ad].
Deleted applications/examples/static/img/icons/slices.png version [9ebf1550d8].
Deleted applications/examples/static/img/icons/tutorials.png version [c2433dd331].
Deleted applications/examples/static/img/icons/twitter.png version [f5cbfb42b8].
Deleted applications/examples/static/img/icons/usergroups.png version [b7139dde61].
Deleted applications/examples/static/img/icons/uservoice.png version [0d71619532].
Deleted applications/examples/static/img/icons/videos.png version [639320ebef].
Deleted applications/examples/static/img/logo3Tones.png version [64bc8f5bd2].
Deleted applications/examples/static/img/logo_bw.png version [302b12b7b3].
Deleted applications/examples/static/img/logo_db.png version [5d5033eca0].
Deleted applications/examples/static/img/logo_lb.png version [1ce85f083c].
Deleted applications/examples/static/img/netdow1.png version [475141bba7].
Deleted applications/examples/static/img/netdow2.png version [c39b6d2525].
Deleted applications/examples/static/img/netdow3.png version [c703e5329e].
Deleted applications/examples/static/img/online_book_cover.jpg version [bf3c689113].
Deleted applications/examples/static/img/tipDownloads.png version [2ad4b350e0].
Deleted applications/examples/static/img/tipDownloads2.png version [b4becb3823].
Deleted applications/examples/static/img/web2py_logo.png version [2479398bdc].
Deleted applications/examples/static/js/calendar.js version [dabf984f8c].
Deleted applications/examples/static/js/jquery.js version [7622c9ac23].
Deleted applications/examples/static/js/web2py_ajax.js version [7f2851f561].
Deleted applications/examples/static/kpax.png version [df86cf8c7e].
Deleted applications/examples/static/markmin.html version [770a4eca1c].
Deleted applications/examples/static/robots.txt version [00914a3dbd].
Deleted applications/examples/static/title.png version [4ed899302f].
Deleted applications/examples/static/web2py_logo.png version [2479398bdc].
Deleted applications/examples/static/web2py_logo_light.png version [9bb63c121c].
Deleted applications/examples/views/ajax_examples/fade.html version [e7aa5189d8].
Deleted applications/examples/views/ajax_examples/index.html version [2fd6a0649e].
Deleted applications/examples/views/appadmin.html version [3b13f939eb].
Deleted applications/examples/views/database_examples/buy.html version [9c79d70cf8].
Deleted applications/examples/views/default/changelog.html version [51c880bb1f].
Deleted applications/examples/views/default/documentation.html version [8968f7f1ba].
Deleted applications/examples/views/default/download.html version [fcd696b3fd].
Deleted applications/examples/views/default/examples.html version [ed383c3b10].
Deleted applications/examples/views/default/index.html version [500a555007].
Deleted applications/examples/views/default/license.html version [77628486a9].
Deleted applications/examples/views/default/support.html version [b6989e8a95].
Deleted applications/examples/views/default/usergroups.html version [d8a8ea5563].
Deleted applications/examples/views/default/videos.html version [091e89e96a].
Deleted applications/examples/views/default/what.html version [5c10370384].
Deleted applications/examples/views/default/who.html version [7161e119e7].
Deleted applications/examples/views/generic.html version [8c1f46b26e].
Deleted applications/examples/views/generic.json version [25f5fba8a2].
Deleted applications/examples/views/generic.load version [d38b6c52f3].
Deleted applications/examples/views/generic.rss version [f16be9a903].
Deleted applications/examples/views/generic.xml version [8aecf60dfa].
Deleted applications/examples/views/global/vars.html version [8910c2a98c].
Deleted applications/examples/views/images_examples/index.html version [4ef87f3eab].
Deleted applications/examples/views/layout.html version [530cee6691].
Deleted applications/examples/views/layout_examples/basic.html version [503baf211e].
Deleted applications/examples/views/layout_examples/civilized.html version [25695445ff].
Deleted applications/examples/views/layout_examples/slick.html version [0e1addb63a].
Deleted applications/examples/views/session_examples/counter.html version [209e13c459].
Deleted applications/examples/views/simple_examples/hello3.html version [f5821e98a8].
Deleted applications/examples/views/spreadsheet/index.html version [8d31ea574b].
Deleted applications/examples/views/template_examples/beautify.html version [7fe049ca86].
Deleted applications/examples/views/template_examples/escape.html version [2424b92746].
Deleted applications/examples/views/template_examples/test_def.html version [279b8cba35].
Deleted applications/examples/views/template_examples/test_for.html version [c3bacad07e].
Deleted applications/examples/views/template_examples/test_if.html version [b03b1579a9].
Deleted applications/examples/views/template_examples/test_try.html version [a5abc71db7].
Deleted applications/examples/views/template_examples/variables.html version [f24dbec526].
Deleted applications/examples/views/template_examples/xml.html version [e0927413bf].
Deleted applications/examples/views/web2py_ajax.html version [679a48264c].
Modified applications/mobileblur/controllers/default.py
from [f7fe7a35c9]
to [b38b4efcae].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - + + + + + + + + + + + + + + + | from pprint import pprint def index(): 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 |
Modified applications/mobileblur/models/0_helpers.py
from [d9e34b5918]
to [6363f858c9].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 | - - - - + + + + + + + | newsblur = local_import("newsblur") threshold = 0 thresholds = ["nt", "ps", "ng"] # indices -1, 0, 1 for negative, neutral, and positive intelligence filters |
Modified applications/mobileblur/models/db.py
from [9c80a3439c]
to [34c2cab0a7].
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + | ## - 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 |
︙ | |||
82 83 84 85 86 87 88 | 83 84 85 86 87 88 89 | - | ######################################################################### db.define_table("users", Field("username"), Field("password"), Field("cookie") ) |
Added applications/mobileblur/views/default/login.html version [52a0d74dbd].
Deleted applications/welcome/ABOUT version [f4515d4b07].
Deleted applications/welcome/LICENSE version [23c98cb4b6].
Deleted applications/welcome/__init__.py version [da39a3ee5e].
Deleted applications/welcome/controllers/appadmin.py version [1eb6fe022d].
Deleted applications/welcome/controllers/default.py version [2692ae6403].
Deleted applications/welcome/cron/crontab version [2523d8a048].
Deleted applications/welcome/languages/es-es.py version [02c08ffea8].
Deleted applications/welcome/languages/fr-ca.py version [a1c8c80bd7].
Deleted applications/welcome/languages/fr-fr.py version [12b6d60c6d].
Deleted applications/welcome/languages/hi-hi.py version [568b21ea86].
Deleted applications/welcome/languages/hu-hu.py version [cbea9c4c52].
Deleted applications/welcome/languages/hu.py version [cbea9c4c52].
Deleted applications/welcome/languages/it-it.py version [968a746998].
Deleted applications/welcome/languages/it.py version [968a746998].
Deleted applications/welcome/languages/pl-pl.py version [92556d9416].
Deleted applications/welcome/languages/pl.py version [1cc9928895].
Deleted applications/welcome/languages/pt-br.py version [359b67f161].
Deleted applications/welcome/languages/pt-pt.py version [6f522fc1e4].
Deleted applications/welcome/languages/pt.py version [6f522fc1e4].
Deleted applications/welcome/languages/ru-ru.py version [628e206f31].
Deleted applications/welcome/languages/sk-sk.py version [928c03512a].
Deleted applications/welcome/languages/zh-tw.py version [b37aeebf91].
Deleted applications/welcome/models/db.py version [f6575d3cb8].
Deleted applications/welcome/models/menu.py version [2fb70868d5].
Deleted applications/welcome/modules/__init__.py version [da39a3ee5e].
Deleted applications/welcome/static/css/base.css version [0353986da0].
Deleted applications/welcome/static/css/calendar.css version [263a0ae7af].
Deleted applications/welcome/static/css/handheld.css version [721460498f].
Deleted applications/welcome/static/css/superfish-navbar.css version [f80d0fda82].
Deleted applications/welcome/static/css/superfish-vertical.css version [cc09787089].
Deleted applications/welcome/static/css/superfish.css version [e354e3670d].
Deleted applications/welcome/static/favicon.ico version [8849e0925e].
Deleted applications/welcome/static/images/arrows-ffffff.png version [848c456cab].
Deleted applications/welcome/static/images/css3buttons_icons.png version [3d43fcf538].
Deleted applications/welcome/static/images/error.png version [a460cc5cea].
Deleted applications/welcome/static/images/ok.png version [64ef5ff48b].
Deleted applications/welcome/static/images/poweredby.png version [0baee84b0d].
Deleted applications/welcome/static/images/shadow.png version [7ea95cf0e2].
Deleted applications/welcome/static/images/warn.png version [5b675a6959].
Deleted applications/welcome/static/images/warning.png version [9c06299898].
Deleted applications/welcome/static/js/calendar.js version [ee22da85cc].
Deleted applications/welcome/static/js/dd_belatedpng.js version [11ff3e17f1].
Deleted applications/welcome/static/js/jquery.js version [7622c9ac23].
Deleted applications/welcome/static/js/modernizr-1.7.min.js version [96922cbe86].
Deleted applications/welcome/static/js/superfish.js version [b7b4fdd4a0].
Deleted applications/welcome/static/js/web2py_ajax.js version [7f2851f561].
Deleted applications/welcome/static/robots.txt version [32c4950688].
Deleted applications/welcome/views/__init__.py version [da39a3ee5e].
Deleted applications/welcome/views/appadmin.html version [3b13f939eb].
Deleted applications/welcome/views/default/index.html version [58e990f1c8].
Deleted applications/welcome/views/default/user.html version [7cba4a5dbc].
Deleted applications/welcome/views/generic.html version [5ecbd3689c].
Deleted applications/welcome/views/generic.json version [2eb11890a0].
Deleted applications/welcome/views/generic.load version [fa6df36d52].
Deleted applications/welcome/views/generic.pdf version [c404f699b1].
Deleted applications/welcome/views/generic.rss version [ed113b27d9].
Deleted applications/welcome/views/generic.xml version [92f603b5bb].
Deleted applications/welcome/views/layout.html version [78b7d8a5ef].
Deleted applications/welcome/views/web2py_ajax.html version [4a6f603253].
Modified cgihandler.py
from [2f1a36bb3b]
to [d56b243ab0].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 | + | 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) |
Modified fcgihandler.py
from [381db6b66f]
to [196448d2fb].
︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 | + | 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() |
Modified gaehandler.py
from [2e5f959427]
to [439fc9680b].
︙ | |||
109 110 111 112 113 114 115 | 109 110 111 112 113 114 115 116 | + | if APPSTATS: run_wsgi_app(wsgiapp) else: wsgiref.handlers.CGIHandler().run(wsgiapp) if __name__ == '__main__': main() |
Modified gluon/__init__.py
from [261ab37d87]
to [08875d3c07].
︙ | |||
14 15 16 17 18 19 20 21 | 14 15 16 17 18 19 20 21 22 23 24 25 | + + + + | 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/__init__.pyc version [4b1dda92da].
Modified gluon/admin.py
from [76dc3c9e63]
to [d5f62e0e51].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + | 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 |
︙ | |||
340 341 342 343 344 345 346 | 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | - + | `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 |
︙ | |||
446 447 448 449 450 451 452 453 | 446 447 448 449 450 451 452 453 454 455 | + + | 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/admin.pyc version [f384b2f33c].
Added gluon/cache.py version [9258d641dc].
Added gluon/cache.pyc version [4c62f4a468].
Modified gluon/cfs.py
from [a70d589858]
to [f85d4d8306].
︙ | |||
44 45 46 47 48 49 50 51 | 44 45 46 47 48 49 50 51 52 53 | + + | data = read_file(filename) else: data = filter() cfs_lock.acquire() cfs[key] = (t, data) cfs_lock.release() return data |
Added gluon/cfs.pyc version [c27431a52a].
Modified gluon/compileapp.py
from [77197379d7]
to [f463c4874e].
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | - + - + - + + + - - - + - + | response._vars = html sys.stdout = stdout _TEST() """ class mybuiltin(object): """ |
︙ | |||
262 263 264 265 266 267 268 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | - + | current.T = t current.cache = c global __builtins__ if is_jython: # jython hack __builtins__ = mybuiltin() else: |
︙ | |||
310 311 312 313 314 315 316 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | - + | def compile_views(folder): """ Compiles all the views in the application specified by `folder` """ path = os.path.join(folder, 'views') |
︙ | |||
564 565 566 567 568 569 570 571 | 564 565 566 567 568 569 570 571 572 573 | + + | return if __name__ == '__main__': import doctest doctest.testmod() |
Added gluon/compileapp.pyc version [fde14323b3].
Modified gluon/contenttype.py
from [b7880bfab9]
to [7a890ef3d0].
︙ | |||
240 241 242 243 244 245 246 247 248 249 250 251 252 253 | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | + | '.jpeg': 'image/jpeg', '.jpf': 'image/jp2', '.jpg': 'image/jpeg', '.jpr': 'application/x-jbuilder-project', '.jpx': 'image/jp2', '.js': 'application/javascript', '.json': 'application/json', '.jsonp': 'application/jsonp', '.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', |
︙ | |||
711 712 713 714 715 716 717 718 | 712 713 714 715 716 717 718 719 720 721 | + + | 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/contenttype.pyc version [e29ed3a249].
Modified gluon/contrib/AuthorizeNet.py
from [e1e5a92158]
to [d3aed38008].
︙ | |||
253 254 255 256 257 258 259 260 | 253 254 255 256 257 258 259 260 261 | + | print 'An error occured' print 'approved',payment.isApproved() print 'declined',payment.isDeclined() print 'error',payment.isError() if __name__=='__main__': test() |
Modified gluon/contrib/__init__.py
from [71853c6197]
to [7c338ed284].
|
Modified gluon/contrib/comet_messaging.py
from [9ef31a1bd5]
to [0d35f52c8b].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + | #!/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 |
︙ | |||
184 185 186 187 188 189 190 191 | 184 185 186 187 188 189 190 191 192 | + | (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() |
Modified gluon/contrib/feedparser.py
from [5437fea58f]
to [9e55c095f1].
1 | 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 |
︙ | |||
33 34 35 36 37 38 39 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 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 | - - - - - - - + + + + + + + + + + - - + - - - - + - - + - + + + + - + + + + - + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + - - - + + + - - + - + - - - - + - - - + + + - - + + - + + + + + + + + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + - - - - - - + + + + + + + + + + + + - - - + - - - - - + - - - - - + - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + - - - - - - - - - - - - - - - - - + - - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + - - - - + + + + + + + + + - + - + - - - - - - + + + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - + + + + + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - + - + - - - - - - - - + - - - - - + + + + + - - + + + - + - - + + + + + + + + + - + + + - + - - - - - - - + + + + + + + + + - - - - - + - - + - - - + + - - + - - - + + - - + - - - + + + + + - - - - - - - - + + + + - - - - + + - + - - + - - + - - - - - - - - - + + + + - + + + + + - - - - - - + + - + + + - + + - - + - - - - - - + + + + - - - + - - - + - - - - - - - - - - - - - - - - - - + - - + - - - - - - + - - - + + - + - + - - - + - - - - - - - - - - + + + - - + + + - + + + + - - + + - + - + - + - - - + - - + + - - - + + - - - + - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + - - + - + + + + - + + + - + - - - - + + + + + + + + + + + + + + + + + - + - - - + - + + + + + + - - + + + + + + + + - + - + + + + + - - - + + + - + - - + - + + + - + - - - - - - + + - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - - + + + + - + - + - - - - + + + - - + + + + - + - - - - + - - - + + + - + - - - + - + + + + - - - + + + - - + + + + - | 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.""" |
︙ | |||
1327 1328 1329 1330 1331 1332 1333 | 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 | - - + - - + - + - + - + - - - - - - - - - - + + + + - + - - - - - + + - + - + - - + - - + - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - - - + - - + - - - - - - - - - + - - + - + - + - - + - - + - + + + - - + + + - + + + + + + + + + - - - - - + + + + + + + + - - + - + - - + - - - - - + + + + - + - + - + - - + + + + + + - + - + - - - - + - - - - - - - - - - + - + - - - + - - + + - + + + + - - - - + + + + - - + + - - + + - - + - - - - - - - + - + - - | def _end_dc_contributor(self): self._end_name() self.incontributor = 0 def _start_name(self, attrsD): self.push('name', 0) |
︙ | |||
1775 1776 1777 1778 1779 1780 1781 | 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 | - + - - + - - - - - - - - + + + - + + + + + + + + - + - - - - + - - + - - - + - - - + + - - - - + + - + + + + - + - + + + + - + + + + + + + + + + + + + - - + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - - - - - + - + - - - + - + - - + - - - + - - - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - + - - + - + - + + + + + - - + + - + - - - - - - - - - - + + - - - + - + - - - + + + + + + - - - + + + + + + + + + + + + + + + + - + - - + + + + + + + - - + + + - + + - - - - + + + - - - - - - - - + + + + + + + - - - - - - + + + + + + + + + + + + - - - + - + + + + + + + - + - - - + + + + - - - - - - - - - - - - + - - - + - - - + + + + + - + + + - + - + - + + + + + + + - - + - - - - - + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - + - - + - - - - - - + + + + + + + + + + + + + + + + + + + + - - + - - - - - - - - + - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + - - - - - - - + - - - - - - - - - + + + + + + + + + + - - - - + + - - - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + - - - + - - - + - - + - - - + - + - - - + - - - - + + + - - - - - - - - - - - + + - + - - - - - - - - - + - - - - + - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - + - - - - - - - - - - - - - + - - - - + + + + + - - - + + - - - + + - - - - + - - - - - - - - - - - + + + + + + + + + + - - + + + + + + - - - - - + + - + - - - + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - + - - - + + - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + - - - - + - - - + - - - + - - - + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - + + + - + - - - - - - - - - + + - - - - - + - - - - - - - - - - + + - - - - - - - - - + - - - - - - + - - - - - - - - + + + + + - - + + - - + + - - - + - - - + - - - + - - + - - - + - - - - - - - + - - + - - + - - - + - - + - - - + - - - - - - + - - - - + - - - + - - - + - - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - + + - - - + - - - - + + - - - - + - - - - - - + + - - - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - - - + - - - + + - - - - - - - - + + + + + + + - - - - - + + - - - + - - + - - - - - - - - - + - + - - - - - - - - - - - + - + - + - + - + - + - + - - + - - - - - + + + + + - - - + + + - + - + - - - - - + - + + - + - + + + + + + + + + + - - - - + - - - - - - + + + + + + + + + + + + + + + + - - + + + + + - - - + + + - - - - - - + + - - - - - - - + | 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') |
︙ | |||
3321 3322 3323 3324 3325 3326 3327 | 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 | - + - + - - + - - + + - + + + - - - + + + - - + - - - + - - - + - - - + - - - + - - + - + - - - + - - - + - - + - + - - - + - + - - - + - + - - - + - + - - - + - + - - - + - - - + - - - + - - + + - - - - - - - - - - - - - - + - - + - - - + - - + - - + + - - + - - - - - + + + + + - - - + + + + + + - - + - - + - - - - - + - - - - - - - + - - - - - - + - - - - - + - - - - - + - - - - - - - - - + - + + + + - - - - - - - + + + + + + + + + + + + + + + + - + - + - - - - - + + + + + + + + - - + - - + + + + - - - + + - + - - - - - - - - + - + + + + + + + + - - + + - - + + + - - - + + - - - + + - + - - - - - - - + + + + + + + + + + + + + + - + - - + + + - - + - - - - + + + - + - + + - - + + + + + + + - - + - - - + + - - + - - - - + - + + + - - - - - + - - - + + - - + + - - - - + + + + - - + - - - + + + - - + - + + - - + + + + + + + + + + - - + + + - - + - + + - - - - - - + + + + + - - - + + + - - - - - + - - + - - - - - - - + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 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/ |
Modified gluon/contrib/gae_retry.py
from [1cb2d390ab]
to [d1acb30472].
︙ | |||
80 81 82 83 84 85 86 87 | 80 81 82 83 84 85 86 87 88 | + | 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 |
Modified gluon/contrib/gateways/__init__.py
from [adc83b19e7]
to [71853c6197].
|
Modified gluon/contrib/gateways/fcgi.py
from [7ac081e792]
to [d4488e5a46].
︙ | |||
1325 1326 1327 1328 1329 1330 1331 | 1325 1326 1327 1328 1329 1330 1331 1332 | + | yield '<tr><td>%s</td><td>%s</td></tr>\n' % ( field.name, field.value) yield '</table>\n' \ '</body></html>\n' WSGIServer(test_app).run() |
Modified gluon/contrib/generics.py
from [adcdc0c9ce]
to [390d0316f6].
︙ | |||
57 58 59 60 61 62 63 64 | 57 58 59 60 61 62 63 64 65 | + | 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) |
Modified gluon/contrib/gql.py
from [3aaca8ca98]
to [0d590a942a].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 | + | # 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 |
Modified gluon/contrib/login_methods/__init__.py
from [adc83b19e7]
to [71853c6197].
|
Modified gluon/contrib/login_methods/basic_auth.py
from [2e3886c513]
to [8fc3dad06c].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 | + | request = urllib2.Request(server, None, headers) try: urllib2.urlopen(request) return True except (urllib2.URLError, urllib2.HTTPError): return False return basic_login_aux |
Modified gluon/contrib/login_methods/cas_auth.py
from [d133c59928]
to [e55e655978].
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - - - - - - + + + + + + | 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 |
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 | + | 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)) |
Modified gluon/contrib/login_methods/email_auth.py
from [e3e7a81207]
to [5bde81e3c1].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 | + | server.quit() return True except: if server: server.quit() return False return email_auth_aux |
Modified gluon/contrib/login_methods/extended_login_form.py
from [3b801e0ba3]
to [6b873fea64].
︙ | |||
96 97 98 99 100 101 102 | 96 97 98 99 100 101 102 103 | + | 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 |
Modified gluon/contrib/login_methods/gae_google_account.py
from [d7134f9326]
to [60d4e8af75].
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 | + | 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") |
Modified gluon/contrib/login_methods/ldap_auth.py
from [a193ec84c7]
to [bf4169c283].
︙ | |||
164 165 166 167 168 169 170 | 164 165 166 167 168 169 170 171 | + | 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 |
Modified gluon/contrib/login_methods/linkedin_account.py
from [895fd3ad22]
to [c50499f133].
︙ | |||
43 44 45 46 47 48 49 50 | 43 44 45 46 47 48 49 50 51 | + | 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) |
Modified gluon/contrib/login_methods/loginza.py
from [9d60d8dc81]
to [e22bc12e75].
︙ | |||
105 106 107 108 109 110 111 | 105 106 107 108 109 110 111 112 | + | _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 |
Modified gluon/contrib/login_methods/oauth10a_account.py
from [5c58b0dc60]
to [429a2654f8].
︙ | |||
181 182 183 184 185 186 187 188 189 | 181 182 183 184 185 186 187 188 189 190 | + | 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 |
Modified gluon/contrib/login_methods/oauth20_account.py
from [a0753ce99b]
to [fa60d45fe4].
︙ | |||
200 201 202 203 204 205 206 | 200 201 202 203 204 205 206 207 | + | "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 |
Modified gluon/contrib/login_methods/openid_auth.py
from [c162874b83]
to [7ededcc3db].
︙ | |||
624 625 626 627 628 629 630 631 | 624 625 626 627 628 629 630 631 632 | + | def cleanup(self): """ This method should be run periodically to free the db from expired nonce and association entries. """ return self.cleanupNonces(), self.cleanupAssociations() |
Modified gluon/contrib/login_methods/pam_auth.py
from [b25e852978]
to [b501071923].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + | 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 |
Modified gluon/contrib/login_methods/rpx_account.py
from [fc14c29978]
to [682968d4ff].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | + - + | #!/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 os import re import urllib |
︙ | |||
48 49 50 51 52 53 54 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - - + + + - - - - + + + + - - + + | 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() |
︙ | |||
107 108 109 110 111 112 113 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | + + + + + + + + + + + + | 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 def use_janrain(auth,filename='private/janrain.key',**kwargs): path = os.path.join(current.request.folder,filename) if os.path.exists(path): request = current.request domain,key = open(path,'r').read().strip().split(':') host = current.request.env.http_host url = "http://%s/%s/default/user/login" % (host,request.application) auth.settings.actions_disabled = \ ['register','change_password','request_reset_password'] auth.settings.login_form = RPXAccount( request, api_key=key,domain=domain, url = url,**kwargs) |
Added gluon/contrib/login_methods/x509_auth.py version [43a52f429f].
Modified gluon/contrib/markdown/__init__.py
from [d81967309e]
to [87b3777bf4].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 | + | else: extras=None text = text.decode(encoding,'replace') return XML(markdown(text,extras=extras, safe_mode=safe_mode, html4tags=html4tags)\ .encode(encoding,'xmlcharrefreplace'),**attributes) |
Modified gluon/contrib/markdown/markdown2.py
from [91558b728e]
to [c117c9a0ff].
︙ | |||
1882 1883 1884 1885 1886 1887 1888 1889 | 1882 1883 1884 1885 1886 1887 1888 1889 1890 | + | norm_html = html norm_perl_html = perl_html print "==== match? %r ====" % (norm_perl_html == norm_html) if __name__ == "__main__": sys.exit( main(sys.argv) ) |
Modified gluon/contrib/markmin/__init__.py
from [adc83b19e7]
to [71853c6197].
|
Modified gluon/contrib/markmin/markmin2html.py
from [4b3f535252]
to [b5f7ebf604].
| 1 2 3 4 5 6 7 8 9 | - + + |
|
︙ | |||
393 394 395 396 397 398 399 | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | + - + + | ############################################################# # 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( |
︙ | |||
449 450 451 452 453 454 455 | 452 453 454 455 456 457 458 459 | + | fargv = open(sys.argv[1],'r') try: print '<html><body>'+markmin2html(fargv.read())+'</body></html>' finally: fargv.close() else: doctest.testmod() |
Modified gluon/contrib/markmin/markmin2latex.py
from [b2aa948b56]
to [fba5f42f79].
︙ | |||
277 278 279 280 281 282 283 284 | 277 278 279 280 281 282 283 284 285 | + | 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 |
Modified gluon/contrib/markmin/markmin2pdf.py
from [10244f7fd3]
to [25d21339f1].
︙ | |||
123 124 125 126 127 128 129 | 123 124 125 126 127 128 129 130 | + | if errors: print 'ERRORS:'+'\n'.join(errors) print 'WARNGINS:'+'\n'.join(warnings) else: print data else: doctest.testmod() |
Modified gluon/contrib/memdb.py
from [b91e54b5c2]
to [09fdfa483b].
︙ | |||
900 901 902 903 904 905 906 907 | 900 901 902 903 904 905 906 907 908 | + | SQLSet = Set SQLRows = Rows SQLStorage = DALStorage if __name__ == '__main__': import doctest doctest.testmod() |
Modified gluon/contrib/pam.py
from [0f00a610f9]
to [40c18f46ed].
︙ | |||
117 118 119 120 121 122 123 124 | 117 118 119 120 121 122 123 124 125 | + | retval = PAM_AUTHENTICATE(handle, 0) return retval == 0 if __name__ == "__main__": import getpass print authenticate(getpass.getuser(), getpass.getpass()) |
Modified gluon/contrib/populate.py
from [5bbd5140d2]
to [8da0cd7b63].
cannot compute difference between binary files
Modified gluon/contrib/pyfpdf/__init__.py
from [5d666989e3]
to [a690337115].
1 2 3 4 | 1 2 3 4 5 | + | from fpdf import FPDF from html import HTMLMixin from template import Template |
Modified gluon/contrib/pyfpdf/designer.py
from [1f28537045]
to [707a438744].
︙ | |||
727 728 729 730 731 732 733 734 735 | 727 728 729 730 731 732 733 734 735 736 | + | app = wx.PySimpleApp() ogl.OGLInitialize() frame = AppFrame() app.MainLoop() app.Destroy() |
Modified gluon/contrib/pyfpdf/fpdf.py
from [f8476450e4]
to [d25003acc5].
︙ | |||
1094 1095 1096 1097 1098 1099 1100 | 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 | - + | 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']) |
︙ | |||
1678 1679 1680 1681 1682 1683 1684 1685 1686 | 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 | + | '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} |
Modified gluon/contrib/pyfpdf/html.py
from [163edc0937]
to [3dda777bd7].
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - + + + - + | g = int(color[3:5], 16) b = int(color[5:7], 16) return r, g, b class HTML2FPDF(HTMLParser): "Render basic HTML to FPDF" |
︙ | |||
211 212 213 214 215 216 217 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | - - + + | 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: |
︙ | |||
321 322 323 324 325 326 327 | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | - - - + + + | 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 |
︙ | |||
376 377 378 379 380 381 382 | 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | - + - + | 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(): |
︙ | |||
449 450 451 452 453 454 455 456 | 451 452 453 454 455 456 457 458 459 | + | #First page pdf.add_page() pdf.write_html(html) pdf.output('html.pdf','F') import os os.system("evince html.pdf") |
Modified gluon/contrib/pyfpdf/template.py
from [8c2f756bd0]
to [6ad8a4bf31].
︙ | |||
270 271 272 273 274 275 276 277 | 270 271 272 273 274 275 276 277 278 | + | f['total'] = "%0.2f" % total f.render("./invoice.pdf") if sys.platform.startswith("linux"): os.system("evince ./invoice.pdf") else: os.system("./invoice.pdf") |
Modified gluon/contrib/pymysql/__init__.py
from [78c4ae0f0c]
to [af2063e3d8].
︙ | |||
106 107 108 109 110 111 112 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | - + + | def thread_safe(): return True # match MySQLdb.thread_safe() def install_as_MySQLdb(): """ After this function is called, any application that imports MySQLdb or |
Modified gluon/contrib/pymysql/charset.py
from [52fa72dd4e]
to [def27d46a2].
︙ | |||
167 168 169 170 171 172 173 174 | 167 168 169 170 171 172 173 174 175 | + | _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) |
Modified gluon/contrib/pymysql/connections.py
from [450fe7200b]
to [ca9bc8dfa0].
︙ | |||
50 51 52 53 54 55 56 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - + | UNSIGNED_INT64_LENGTH = 8 DEFAULT_CHARSET = 'latin1' MAX_PACKET_LENGTH = 256*256*256-1 def dump_packet(data): |
︙ | |||
711 712 713 714 715 716 717 | 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 | - + | #sock = self.socket #sock.send(send_data) # def _execute_command(self, command, sql): self._send_command(command, sql) |
︙ | |||
926 927 928 929 930 931 932 | 926 927 928 929 930 931 932 933 | + | 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) |
Modified gluon/contrib/pymysql/converters.py
from [757622cc63]
to [fb589cd37b].
︙ | |||
340 341 342 343 344 345 346 | 340 341 342 343 344 345 346 347 | + | def escape_decimal(obj): return unicode(obj) encoders[Decimal] = escape_decimal except ImportError: pass |
Modified gluon/contrib/pymysql/cursors.py
from [5fb47ad768]
to [1d181823ec].
︙ | |||
244 245 246 247 248 249 250 | 244 245 246 247 248 249 250 251 | + | DatabaseError = DatabaseError DataError = DataError OperationalError = OperationalError IntegrityError = IntegrityError InternalError = InternalError ProgrammingError = ProgrammingError NotSupportedError = NotSupportedError |
Modified gluon/contrib/pymysql/err.py
from [5e9f1064e5]
to [731d737012].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + - + | 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 |
︙ | |||
105 106 107 108 109 110 111 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - + - + - + + | 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 |
Modified gluon/contrib/pymysql/times.py
from [61417113cb]
to [323a9ccf6a].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 | + | return date(*localtime(ticks)[:3]) def TimeFromTicks(ticks): return time(*localtime(ticks)[3:6]) def TimestampFromTicks(ticks): return datetime(*localtime(ticks)[:6]) |
Modified gluon/contrib/pymysql/util.py
from [22ae6bac87]
to [43d79c2f5e].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 | + | if len(bs) == 0: return "" else: rv = bs[0] for b in bs[1:]: rv += b return rv |
Modified gluon/contrib/pyrtf/Constants.py
from [2d350ca81b]
to [cbebd4e93b].
︙ | |||
151 152 153 154 155 156 157 | 151 152 153 154 155 156 157 158 | + | def _IsValid( cls, value ) : return value in cls.Codes IsValid = classmethod( _IsValid ) if __name__ == '__main__' : PrintHexTable() |
Modified gluon/contrib/pyrtf/Elements.py
from [35d5cf4635]
to [c397df8a85].
︙ | |||
750 751 752 753 754 755 756 | 750 751 752 753 754 755 756 757 | + | if len( params ) == 1 : return Text( params[ 0 ], text_props ) result = Inline( text_props ) apply( result.append, params ) return result |
Modified gluon/contrib/pyrtf/PropertySets.py
from [3f0dc65a6d]
to [8d526daf62].
︙ | |||
482 483 484 485 486 487 488 | 482 483 484 485 486 487 488 489 | + | MarginsPS = MarginsPropertySet ShadingPS = ShadingPropertySet BorderPS = BorderPropertySet FramePS = FramePropertySet TabPS = TabPropertySet TextPS = TextPropertySet ParagraphPS = ParagraphPropertySet |
Modified gluon/contrib/pyrtf/Renderer.py
from [96ed85b1dc]
to [dcaec1c401].
︙ | |||
632 633 634 635 636 637 638 | 632 633 634 635 636 637 638 639 | + | self._write( r'\cell' ) else : self._write( r'\pard\intbl\cell' ) self._write( '\\row}\n' ) |
Modified gluon/contrib/pyrtf/Styles.py
from [8959273adb]
to [ce1838c3a2].
︙ | |||
87 88 89 90 91 92 93 | 87 88 89 90 91 92 93 94 | + | 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 |
Modified gluon/contrib/pyrtf/__init__.py
from [8899891f0b]
to [b8639d16f2].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 | + | 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() |
Modified gluon/contrib/pysimplesoap/__init__.py
from [5bfa6115e7]
to [cf49d9cce3].
1 2 3 | 1 2 3 4 | + | #!/usr/bin/env python # -*- coding: utf-8 -*- "Contributed modules" |
Modified gluon/contrib/pysimplesoap/client.py
from [08dd76e0d3]
to [52b298d0e3].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - + - + - - + + - + - + - + - - - + + + | 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() |
︙ | |||
100 101 102 103 104 105 106 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + - + | 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) |
︙ | |||
127 128 129 130 131 132 133 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - + - + - - + + | 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 |
︙ | |||
178 179 180 181 182 183 184 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 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 | - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + | 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 |
︙ | |||
333 334 335 336 337 338 339 | 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 | - + - + | 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 |
︙ | |||
387 388 389 390 391 392 393 | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | - + | 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 |
︙ | |||
451 452 453 454 455 456 457 | 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 | - + - - + + - + - + - + - + - + - - + + - + - + | 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) |
︙ | |||
541 542 543 544 545 546 547 | 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 | - + - + - + - + | 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 |
︙ | |||
588 589 590 591 592 593 594 | 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | - + | 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) |
︙ | |||
633 634 635 636 637 638 639 | 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | - + - + | 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}, |
︙ | |||
665 666 667 668 669 670 671 | 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 | - - - + + + - + - + + | 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, |
Modified gluon/contrib/pysimplesoap/server.py
from [7ef2196ac7]
to [eec0dc1e9f].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | - - - - + + + + - + - + - + - - + + - + - + - + - + - - + + - + - - + + - + | from simplexml import SimpleXMLElement, TYPE_MAP, DateTime, Date, Decimal DEBUG = False class SoapDispatcher(object): "Simple Dispatcher for SOAP Server" |
︙ | |||
142 143 144 145 146 147 148 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - + | return response.as_xml() # Introspection functions: def list_methods(self): "Return a list of aregistered operations" |
︙ | |||
181 182 183 184 185 186 187 | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - + - + | 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"?> |
︙ | |||
237 238 239 240 241 242 243 | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | - + - + - + | 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 |
︙ | |||
298 299 300 301 302 303 304 | 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 | - + - + | 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) |
︙ | |||
345 346 347 348 349 350 351 | 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 | - + - + - + - + | 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) |
︙ | |||
408 409 410 411 412 413 414 | 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 | - + - + - + + | </pys:Adder> </soapenv:Body> </soapenv:Envelope> """ print dispatcher.dispatch(xml) # echo local test (generic soap service) |
Modified gluon/contrib/pysimplesoap/simplexml.py
from [dad238090a]
to [8fc01ec0e6].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | __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 |
︙ | |||
37 38 39 40 41 42 43 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | - + - + | 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) |
︙ | |||
99 100 101 102 103 104 105 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | - + - + | if self.array and False: s = "[%s]" % s return s class SimpleXMLElement(object): "Simple XML manipulation (simil PHP)" |
︙ | |||
136 137 138 139 140 141 142 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + | element.appendChild(self.__document.createTextNode(str(text))) self._element.appendChild(element) return SimpleXMLElement( elements=[element], document=self.__document, namespace=self.__ns, prefix=self.__prefix) |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - + - + - + | 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)" |
︙ | |||
231 232 233 234 235 236 237 | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | - + | 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) |
︙ | |||
256 257 258 259 260 261 262 | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 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 | - + - + - + - + - + - - + + | 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) |
︙ | |||
350 351 352 353 354 355 356 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | - + | 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) |
︙ | |||
381 382 383 384 385 386 387 | 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 | - + - + - + - + + | 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) |
Modified gluon/contrib/rss2.py
from [16f1766766]
to [e94fb7221b].
︙ | |||
582 583 584 585 586 587 588 589 | 582 583 584 585 586 587 588 589 590 | + | guid=Guid('http://www.web2py.com/'), pubDate=datetime.datetime(2007, 11, 14, 10, 30))]) return dumps(rss) if __name__ == '__main__': print test() |
Modified gluon/contrib/shell.py
from [cee4aa579b]
to [eb2ebe95bd].
︙ | |||
260 261 262 263 264 265 266 267 | 260 261 262 263 264 265 266 267 268 | + | finally: sys.modules['__main__'] = old_main return output.getvalue() if __name__=='__main__': history=History() while True: print run(history, raw_input('>>> ')).rstrip() |
Modified gluon/contrib/simplejson/__init__.py
from [85545ee92e]
to [19ad7e29d6].
︙ | |||
407 408 409 410 411 412 413 | 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | - + | 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 |
︙ | |||
433 434 435 436 437 438 439 | 433 434 435 436 437 438 439 440 | + | check_circular=True, allow_nan=True, indent=None, separators=None, encoding='utf-8', default=None, ) |
Modified gluon/contrib/simplejson/decoder.py
from [c0be9ced86]
to [40f329f3c5].
︙ | |||
416 417 418 419 420 421 422 | 416 417 418 419 420 421 422 423 | + | """ try: obj, end = self.scan_once(s, idx) except StopIteration: raise JSONDecodeError("No JSON object could be decoded", s, idx) return obj, end |
Modified gluon/contrib/simplejson/encoder.py
from [f221e2871e]
to [42e8d5e8d4].
︙ | |||
496 497 498 499 500 501 502 | 496 497 498 499 500 501 502 503 | + | o = _default(o) for chunk in _iterencode(o, _current_indent_level): yield chunk if markers is not None: del markers[markerid] return _iterencode |
Modified gluon/contrib/simplejson/ordered_dict.py
from [a551f0ccc4]
to [8c94ff18c0].
︙ | |||
113 114 115 116 117 118 119 | 113 114 115 116 117 118 119 120 | + | 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 |
Modified gluon/contrib/simplejson/scanner.py
from [cc67bf7550]
to [d8f46e6a6a].
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 | + | return _scan_once(string, idx) finally: memo.clear() return scan_once make_scanner = c_make_scanner or py_make_scanner |
Modified gluon/contrib/simplejson/tool.py
from [db7eaed84c]
to [b47035ef9b].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 | + | outfile.write('\n') finally: infile.close() outfile.close() if __name__ == '__main__': main() |
Added gluon/contrib/simplejsonrpc.py version [c62b500ebf].
Modified gluon/contrib/sms_utils.py
from [91ca572846]
to [8d65436de3].
︙ | |||
106 107 108 109 110 111 112 113 | 106 107 108 109 110 111 112 113 114 | + | """ 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] |
Modified gluon/contrib/spreadsheet.py
from [c2702b5142]
to [92270cc749].
︙ | |||
256 257 258 259 260 261 262 263 | 256 257 258 259 260 261 262 263 264 | + | 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 |
Modified gluon/contrib/taskbar_widget.py
from [72bc51f407]
to [3d91432adc].
︙ | |||
237 238 239 240 241 242 243 244 | 237 238 239 240 241 242 243 244 245 | + | RESTART = 3 QUIT = 4 class EnumServerState: RUNNING = 0 STOPPED = 1 |
Modified gluon/contrib/user_agent_parser.py
from [bbbb0c1942]
to [0c846c8b37].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + | """ 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. |
︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + + + + + + - + | 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 is_mobile = 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) result[self.info_type].is_mobile = self.is_mobile if not result.is_mobile: result.is_mobile = result[self.info_type].is_mobile 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 |
︙ | |||
159 160 161 162 163 164 165 | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - + - + | return True def getVersion(self, agent): if "Version/" in agent: return agent.split('Version/')[-1].split(' ')[0].strip() else: # Mobile Safari |
︙ | |||
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | + + - + + | 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' is_mobile = True def getVersion(self, agent): return agent.split('Android')[-1].split(';')[0].strip() class iPhone(Dist): look_for = 'iPhone' is_mobile = True 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('_', '.') |
︙ | |||
275 276 277 278 279 280 281 | 284 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 | - + + + - + - + - - - + + + + - + | _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: |
︙ | |||
361 362 363 364 365 366 367 | 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | - + | ("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'}},), ) |
︙ | |||
388 389 390 391 392 393 394 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | + + + + + + + + + + + + + + | 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() class mobilize(object): def __init__(self, func): self.func = func def __call__(self): from gluon import current user_agent = current.request.user_agent() if user_agent.is_mobile: items = current.response.view.split('.') items.insert(-1,'mobile') current.response.view = '.'.join(items) return self.func() |
Modified gluon/custom_import.py
from [9bbb533900]
to [d331c61dda].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - + + - + + + + | def begin(self): """ Many imports can be made for a single import statement. This method help the management of this aspect. """ |
︙ | |||
93 94 95 96 97 98 99 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + + + + + + - + | # 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() |
︙ | |||
238 239 240 241 242 243 244 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | - + + + + + + | """ 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 |
︙ | |||
304 305 306 307 308 309 310 311 | 318 319 320 321 322 323 324 325 326 327 | + + | prefix += "." + name return result class _Web2pyDateTrackerImporter(_Web2pyImporter, _DateTrackerImporter): """ Like _Web2pyImporter but using a _DateTrackerImporter. """ |
Added gluon/custom_import.pyc version [df735202af].
Modified gluon/dal.py
from [e194d94214]
to [2094d355b9].
︙ | |||
103 104 105 106 107 108 109 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + - - + + + + + + + | '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) |
︙ | |||
184 185 186 187 188 189 190 | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | - + | 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+)*') |
︙ | |||
226 227 228 229 230 231 232 233 234 235 236 237 238 239 | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | + | import contrib.pymysql as pymysql drivers.append('pymysql') except ImportError: logger.debug('no pymysql driver') try: import psycopg2 from psycopg2.extensions import adapt as psycopg2_adapt drivers.append('PostgreSQL') except ImportError: logger.debug('no psycopg2 driver') try: import cx_Oracle drivers.append('Oracle') |
︙ | |||
260 261 262 263 264 265 266 | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | - + | try: import informixdb drivers.append('Informix') logger.warning('Informix support is experimental') except ImportError: logger.debug('no informixdb driver') |
︙ | |||
306 307 308 309 310 311 312 313 314 315 316 317 318 319 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | + + + + + | try: import pymongo drivers.append('mongoDB') except: logger.debug('no mongoDB driver') def OR(a,b): return a|b def AND(a,b): return a&b if 'google' in drivers: is_jdbc = False class GAEDecimalProperty(gae.Property): """ |
︙ | |||
352 353 354 355 356 357 358 359 360 361 362 363 364 365 | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | + | ################################################################################### # class that handles connection pooling (all adapters derived form this one) ################################################################################### class ConnectionPool(object): pools = {} check_active_connection = True @staticmethod def set_folder(folder): thread.folder = folder # ## this allows gluon to commit/rollback all dbs in this thread |
︙ | |||
391 392 393 394 395 396 397 | 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 | - + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + - + | 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) |
︙ | |||
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | + + + + + + | '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 adapt(self,obj): return "'%s'" % obj.replace("'", "''") def integrity_error(self): return self.driver.IntegrityError def operational_error(self): return self.driver.OperationalError 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): |
︙ | |||
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 | 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 | + + + + + + + | def RANDOM(self): return 'Random()' def NOT_NULL(self,default,field_type): return 'NOT NULL DEFAULT %s' % self.represent(default,field_type) def COALESCE(self,first,second): expressions = [self.expand(first)]+[self.expand(e) for e in second] return 'COALESCE(%s)' % ','.join(expressions) def COALESCE_ZERO(self,first): return 'COALESCE(%s,0)' % self.expand(first) def RAW(self,first): return first def ALLOW_NULL(self): return '' def SUBSTRING(self,field,parameters): return 'SUBSTR(%s,%s,%s)' % (self.expand(field), parameters[0], parameters[1]) |
︙ | |||
864 865 866 867 868 869 870 | 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 | - + | 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==(): |
︙ | |||
941 942 943 944 945 946 947 948 | 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 | + + - + | 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) elif not isinstance(expression.op,str): return expression.op() else: |
︙ | |||
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 | 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 | + + | self.execute(query) table._db.commit() logfile.write('success!\n') finally: logfile.close() def _update(self,tablename,query,fields): query = self.filter_tenant(query,[tablename]) 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): query = self.filter_tenant(query,[tablename]) if query: sql_w = ' WHERE ' + self.expand(query) else: sql_w = '' return 'DELETE FROM %s%s;' % (tablename, sql_w) def delete(self,tablename,query): |
︙ | |||
1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 | 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 | + - - + + - + - + | 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) query = self.filter_tenant(query,tablenames) 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) |
︙ | |||
1276 1277 1278 1279 1280 1281 1282 | 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 | - + | 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) |
︙ | |||
1322 1323 1324 1325 1326 1327 1328 | 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 | - + | 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) |
︙ | |||
1446 1447 1448 1449 1450 1451 1452 | 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 | - - - + + + - - + + + + - + + + + + + + + + + + + + - - + + + + + + | 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] |
︙ | |||
1502 1503 1504 1505 1506 1507 1508 | 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 | - + + + - - + - - - - + + | (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={}, |
︙ | |||
1620 1621 1622 1623 1624 1625 1626 | 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 | - + | 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={}, |
︙ | |||
1656 1657 1658 1659 1660 1661 1662 | 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 | - - | 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) |
︙ | |||
1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 | 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 | + + + | '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 adapt(self,obj): return psycopg2_adapt(obj).getquoted() def sequence_name(self,table): return '%s_id_Seq' % table def RANDOM(self): return 'RANDOM()' def distributed_transaction_begin(self,key): |
︙ | |||
1717 1718 1719 1720 1721 1722 1723 | 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 | - + | # 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={}, |
︙ | |||
1755 1756 1757 1758 1759 1760 1761 | 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 | - - - | 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') |
︙ | |||
1784 1785 1786 1787 1788 1789 1790 | 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 | - + | 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={}, |
︙ | |||
1814 1815 1816 1817 1818 1819 1820 | 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 | - | 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') |
︙ | |||
1901 1902 1903 1904 1905 1906 1907 | 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 | - + - + + - + | 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={}, |
︙ | |||
2062 2063 2064 2065 2066 2067 2068 | 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 | - | 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) |
︙ | |||
2168 2169 2170 2171 2172 2173 2174 | 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 | - + | 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={}, |
︙ | |||
2204 2205 2206 2207 2208 2209 2210 | 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 | - + - - + | 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: |
︙ | |||
2268 2269 2270 2271 2272 2273 2274 | 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 | - + - | # 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: |
︙ | |||
2339 2340 2341 2342 2343 2344 2345 | 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 | - + | 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={}, |
︙ | |||
2371 2372 2373 2374 2375 2376 2377 | 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 | - | 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) |
︙ | |||
2437 2438 2439 2440 2441 2442 2443 | 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 | - + - | 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={}, |
︙ | |||
2495 2496 2497 2498 2499 2500 2501 | 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 | - + - | '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={}, |
︙ | |||
2559 2560 2561 2562 2563 2564 2565 | 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 | - + | 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={}, |
︙ | |||
2583 2584 2585 2586 2587 2588 2589 | 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 | - | 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) |
︙ | |||
2680 2681 2682 2683 2684 2685 2686 | 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 | - + | 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={}, |
︙ | |||
2709 2710 2711 2712 2713 2714 2715 | 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 | - - | 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) |
︙ | |||
2754 2755 2756 2757 2758 2759 2760 | 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 | - + + + - + + | 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) |
︙ | |||
2807 2808 2809 2810 2811 2812 2813 | 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 | - - - + + + + - + + | data, self.p = self.data[self.p:], len(self.data) return data def write(self,data): self.data += data def close(self): |
︙ | |||
2841 2842 2843 2844 2845 2846 2847 | 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 | - - + + - - + + - + - - + | 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): |
︙ | |||
2901 2902 2903 2904 2905 2906 2907 | 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 | - + | 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 |
︙ | |||
3042 3043 3044 3045 3046 3047 3048 | 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 | - + | 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={}, |
︙ | |||
3224 3225 3226 3227 3228 3229 3230 | 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 | - + + + | 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() |
︙ | |||
3418 3419 3420 3421 3422 3423 3424 | 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 | - + - + | 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={}, |
︙ | |||
3578 3579 3580 3581 3582 3583 3584 | 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 | - + - + - + - + | '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={}, |
︙ | |||
3704 3705 3706 3707 3708 3709 3710 | 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 | - + - + - + | 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:]] |
︙ | |||
3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 | 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 | + + + + + + | """ 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) m = table_field.match(key) if key in self.get('_extra',{}): return self._extra[key] elif m: try: return dict.__getitem__(self, m.group(1))[m.group(2)] except (KeyError,TypeError): key = m.group(2) return dict.__getitem__(self, key) def __call__(self,key): return self.__getitem__(key) def __setitem__(self, key, value): dict.__setitem__(self, str(key), value) |
︙ | |||
3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | # database and should for RDBMs and some NoSQL databases ################################################################################ class SQLCallableList(list): def __call__(self): return copy.copy(self) def smart_query(fields,text): if not isinstance(fields,(list,tuple)): fields = [fields] new_fields = [] for field in fields: if isinstance(field,Field): new_fields.append(field) elif isinstance(field,Table): for ofield in field: new_fields.append(ofield) else: raise RuntimeError, "fields must be a list of fields" field_map = {} for field in fields: n = field.name.lower() if not n in field_map: field_map[n] = field n = str(field).lower() if not n in field_map: field_map[n] = field re_constants = re.compile('(\"[^\"]*?\")|(\'[^\']*?\')') constants = {} i = 0 while True: m = re_constants.search(text) if not m: break text = text[:m.start()]+('#%i' % i)+text[m.end():] constants[str(i)] = m.group()[1:-1] i+=1 text = re.sub('\s+',' ',text).lower() for a,b in [('&','and'), ('|','or'), ('~','not'), ('==','=='), ('<','<'), ('>','>'), ('<=','<='), ('>=','>='), ('<>','!='), ('=<','<='), ('=>','>='), ('=','=='), (' less or equal than ','<='), (' greater or equal than ','>='), (' equal or less than ','<='), (' equal or greater than ','>='), (' less or equal ','<='), (' greater or equal ','>='), (' equal or less ','<='), (' equal or greater ','>='), (' not equal to ','!='), (' not equal ','!='), (' equal to ','=='), (' equal ','=='), (' equals ','!='), (' less than ','<'), (' greater than ','>'), (' starts with ','startswith'), (' ends with ','endswith'), (' is ','==')]: if a[0]==' ': text = text.replace(' is'+a,' %s ' % b) text = text.replace(a,' %s ' % b) text = re.sub('\s+',' ',text).lower() query = field = neg = op = logic = None for item in text.split(): if field is None: if item == 'not': neg = True elif not neg and not logic and item in ('and','or'): logic = item elif item in field_map: field = field_map[item] else: raise RuntimeError, "Invalid syntax" elif not field is None and op is None: op = item elif not op is None: if item.startswith('#'): if not item[1:] in constants: raise RuntimeError, "Invalid syntax" value = constants[item[1:]] else: value = item if op == '==': op = 'like' if op == '==': new_query = field==value elif op == '<': new_query = field<value elif op == '>': new_query = field>value elif op == '<=': new_query = field<=value elif op == '>=': new_query = field>=value elif op == 'contains': new_query = field.contains(value) elif op == 'like': new_query = field.like(value) elif op == 'startswith': new_query = field.startswith(value) elif op == 'endswith': new_query = field.endswith(value) else: raise RuntimeError, "Invalid operation" if neg: new_query = ~new_query if query is None: query = new_query elif logic == 'and': query &= new_query elif logic == 'or': query |= new_query field = op = neg = logic = None return query class DAL(dict): """ an instance of this class represents a database connection Example:: |
︙ | |||
3900 3901 3902 3903 3904 3905 3906 | 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 | - + + - + | raise RuntimeError, 'failure to commit distributed transaction' else: for (i, db) in instances: db._adapter.commit_prepared(keys[i]) return |
︙ | |||
3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 | 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 | + - - + + + + + | 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 = [] self._referee_name = '%(table)s' 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 |
︙ | |||
4264 4265 4266 4267 4268 4269 4270 | 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 | - - - - + + + + + + + + + | if key not in [ 'migrate', 'primarykey', 'fake_migrate', 'format', 'trigger_name', 'sequence_name', |
︙ | |||
4289 4290 4291 4292 4293 4294 4295 | 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 | - - - - + + + + | 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] |
︙ | |||
4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 | 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 | + + + | raise SyntaxError, \ 'Object %s exists and cannot be redefined' % key self[key] = value def __repr__(self): return '<DAL ' + dict.__repr__(self) + '>' def smart_query(self,fields,text): return Set(self, smart_query(fields,text)) def __call__(self, query=None): if isinstance(query,Table): query = query._id>0 elif isinstance(query,Field): query = query!=None return Set(self, query) |
︙ | |||
4405 4406 4407 4408 4409 4410 4411 | 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 | - + + | 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') |
︙ | |||
4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 | 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 | + + + | def __getattr__(self, key): if key == 'id': return int(self) self.__allocate() return self._record.get(key, None) def get(self, key): return self.__getattr__(key) def __setattr__(self, key, value): if key.startswith('_'): int.__setattr__(self, key, value) return self.__allocate() self._record[key] = value |
︙ | |||
4524 4525 4526 4527 4528 4529 4530 | 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 | - + | 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 |
︙ | |||
4565 4566 4567 4568 4569 4570 4571 | 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 | - + - + + + + | 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() |
︙ | |||
4761 4762 4763 4764 4765 4766 4767 | 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 | - + - + | 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: |
︙ | |||
4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 | 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 | + - - + + | 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): list_reference_s='list:reference' 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) |
︙ | |||
4908 4909 4910 4911 4912 4913 4914 | 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 | - + | 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 != []: |
︙ | |||
4972 4973 4974 4975 4976 4977 4978 4979 | 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 | + + + - + | 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(self,*others): return Expression(self.db, self.db._adapter.COALESCE, self, others, self.type) def coalesce_zero(self): |
︙ | |||
5062 5063 5064 5065 5066 5067 5068 | 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 | - + + + + | 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) |
︙ | |||
5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 | 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 | + + + + + + + + + + + + | def __getitem__(self, i): return None def __str__(self): return self._class class FieldVirtual(object): def __init__(self,f): self.f = f class FieldLazy(object): def __init__(self,f,handler=None): self.f = f self.handler = handler class Field(Expression): Virtual = FieldVirtual Lazy = FieldLazy """ an instance of this class represents a database field example:: a = Field(name, 'string', length=32, default=None, required=False, |
︙ | |||
5177 5178 5179 5180 5181 5182 5183 | 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 | - + | required=False, requires=DEFAULT, ondelete='CASCADE', notnull=False, unique=False, uploadfield=True, widget=None, |
︙ | |||
5211 5212 5213 5214 5215 5216 5217 | 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 | - + + + + - + - + | 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' |
︙ | |||
5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 | 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 | + + | def __str__(self): try: return '%s.%s' % (self.tablename, self.name) except: return '<no table>.%s' % self.name def raw(s): return Expression(None,s) 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:: |
︙ | |||
5388 5389 5390 5391 5392 5393 5394 | 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 | - + | def __init__( self, db, op, first=None, second=None, ): |
︙ | |||
5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 | 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 | + + | 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,str): query = raw(query) elif isinstance(query,Field): query = query!=None if self.query: return Set(self.db, self.query & query) else: return Set(self.db, query) |
︙ | |||
5488 5489 5490 5491 5492 5493 5494 | 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 | - + - + | 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) |
︙ | |||
5533 5534 5535 5536 5537 5538 5539 | 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 | - + - + + + + + + + + + + + + | 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]), |
︙ | |||
5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 | 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 | + + + + + + + + + + + + + + + + + - + - + + + + + + | self.db = db self.records = records self.colnames = colnames self.compact = compact self.response = rawrows def setvirtualfields(self,**keyed_virtualfields): """ db.define_table('x',Field('number','integer')) if db(db.x).isempty(): [db.x.insert(number=i) for i in range(10)] from gluon.dal import lazy_virtualfield class MyVirtualFields(object): # normal virtual field (backward compatible, discouraged) def normal_shift(self): return self.x.number+1 # lazy virtual field (because of @staticmethod) @lazy_virtualfield def lazy_shift(instance,row,delta=4): return row.x.number+delta db.x.virtualfields.append(MyVirtualFields()) for row in db(db.x).select(): print row.number, row.normal_shift, row.lazy_shift(delta=7) """ if not keyed_virtualfields: return self for row in self.records: for (tablename,virtualfields) in keyed_virtualfields.items(): attributes = dir(virtualfields) |
︙ | |||
5777 5778 5779 5780 5781 5782 5783 | 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 | - + | 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] |
︙ | |||
5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 | 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 | + + - + | 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): key = col res = record._extra[col] else: key = f if isinstance(record.get(t, None), Row): res = record[t][f] else: res = record[f] if mode == 'object': |
︙ | |||
6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 | 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 | + + | ################################################################################ # run tests ################################################################################ if __name__ == '__main__': import doctest doctest.testmod() |
Added gluon/dal.pyc version [20a5258c74].
Modified gluon/debug.py
from [48b9d6a75a]
to [08ba1f60b0].
︙ | |||
76 77 78 79 80 81 82 83 84 85 | 76 77 78 79 80 81 82 83 84 85 86 87 | + + | while True: data = pipe_out.read() if data is None: break result.append(data) logger.info("DEBUG: result %s" % repr(result)) return ''.join(result) |
Modified gluon/decoder.py
from [b310fed651]
to [b88475c376].
︙ | |||
68 69 70 71 72 73 74 75 | 68 69 70 71 72 73 74 75 76 77 | + + | encoding=rest[:rest.find(quote_char)] return encoding def decoder(buffer): encoding = autoDetectXMLEncoding(buffer) return buffer.decode(encoding).encode('utf8') |
Added gluon/decoder.pyc version [7da62cc626].
Modified gluon/fileutils.py
from [e355481567]
to [5c9401ac89].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + + | import storage import os import re import tarfile import glob import time import datetime from http import HTTP from gzip import open as gzopen from settings import global_settings __all__ = [ 'parse_version', 'read_file', 'write_file', 'readlines_file', 'up', 'abspath', 'mktree', 'listdir', |
︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | + + + + + + + + | 'w2p_pack', 'w2p_unpack', 'w2p_pack_plugin', 'w2p_unpack_plugin', 'fix_newlines', 'make_fake_file_like_object', ] def parse_version(version = "Version 1.99.0 (2011-09-19 08:23:26)"): re_version = re.compile('[^\d]+ (\d+)\.(\d+)\.(\d+)\s*\((?P<datetime>.+?)\)\s*(?P<type>[a-z]+)?') m = re_version.match(version) a,b,c = int(m.group(1)),int(m.group(2)),int(m.group(3)), s = m.group('type') or 'dev' d = datetime.datetime.strptime(m.group('datetime'),'%Y-%m-%d %H:%M:%S') return (a,b,c,d,s) 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: |
︙ | |||
380 381 382 383 384 385 386 387 | 390 391 392 393 394 395 396 397 398 399 | + + | def make_fake_file_like_object(): class LogFile(object): def write(self, value): pass def close(self): pass return LogFile() |
Added gluon/fileutils.pyc version [f01ef6af2e].
Modified gluon/globals.py
from [60a5318a8f]
to [831ab2321b].
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + + + | self.get_vars = Storage() self.post_vars = Storage() self.vars = Storage() self.folder = None self.application = None self.function = None self.args = List() |
︙ | |||
98 99 100 101 102 103 104 105 106 107 108 109 110 111 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | + + | 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) current.response.headers['Content-Type'] = \ contenttype(_self.extension.lower()) 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) |
︙ | |||
178 179 180 181 182 183 184 185 186 187 188 189 190 191 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | + + + + + + + + + + + + + + + + + | self.body.close() (self.body, self.view) = (obody, oview) else: run_view_in(self._view_environment) page = self.body.getvalue() return page def include_meta(self): s = '' for key,value in (self.meta or {}).items(): s += '<meta name="%s" content="%s" />' % (key,xmlescape(value)) self.write(s,escape=False) def include_files(self): s = '' for k,f in enumerate(self.files or []): if not f in self.files[:k]: filename = f.lower().split('?')[0] if filename.endswith('.css'): s += '<link href="%s" rel="stylesheet" type="text/css" />' % f elif filename.endswith('.js'): s += '<script src="%s" type="text/javascript"></script>' % f self.write(s,escape=False) def stream( self, stream, chunk_size = DEFAULT_CHUNK_SIZE, request=None, ): """ |
︙ |
Added gluon/globals.pyc version [3c7f502a11].
Modified gluon/highlight.py
from [3472f01bc9]
to [20997e491b].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + - + | Do syntax highlighting. """ def __init__( self, mode, link=None, |
︙ | |||
162 163 164 165 166 167 168 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - + | ('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', |
︙ | |||
217 218 219 220 221 222 223 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | - + - + - + - + - + + + | 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) |
︙ | |||
310 311 312 313 314 315 316 | 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 | - + + + | 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] |
Added gluon/highlight.pyc version [7e17a5f9fa].
Modified gluon/html.py
from [a67293b7f5]
to [87e3a1e282].
︙ | |||
42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | + + | 'BEAUTIFY', 'BODY', 'BR', 'BUTTON', 'CENTER', 'CAT', 'CODE', 'COL', 'COLGROUP', 'DIV', 'EM', 'EMBED', 'FIELDSET', 'FORM', 'H1', 'H2', |
︙ | |||
126 127 128 129 130 131 132 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | - - + + + | def URL( a=None, c=None, f=None, r=None, |
︙ | |||
161 162 163 164 165 166 167 | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - + + + + + + + | '/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')) |
︙ | |||
230 231 232 233 234 235 236 | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | + + + + + - + + + + | 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] if args: if encode_embedded_slash: other = '/' + '/'.join([urllib.quote(str(x), '') for x in args]) else: |
︙ | |||
266 267 268 269 270 271 272 | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | - + | 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)) |
︙ | |||
303 304 305 306 307 308 309 | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | - - + + | do not call directly. Use instead: URL.verify(hmac_key='...') the key has to match the one used to generate the URL. >>> r = Storage() |
︙ | |||
379 380 381 382 383 384 385 | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | - + | 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 |
︙ | |||
994 995 996 997 998 999 1000 | 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 | - + | kargs['first_only'] = True sibs = self.siblings(*args, **kargs) if not sibs: return None return sibs[0] class CAT(DIV): |
︙ | |||
1273 1274 1275 1276 1277 1278 1279 | 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 | + + + + + + + + - - - + + + + + + - + | class A(DIV): tag = 'a' def xml(self): if self['delete']: d = "jQuery(this).closest('%s').remove();" % self['delete'] else: d = '' if self['component']: self['_onclick']="web2py_component('%s','%s');%sreturn false;" % \ (self['component'],self['target'] or '',d) self['_href'] = self['_href'] or '#null' |
︙ | |||
1532 1533 1534 1535 1536 1537 1538 | 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 | - + - + - + - + - - + + - + | 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) |
︙ | |||
1600 1601 1602 1603 1604 1605 1606 | 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 | - + | tag = 'textarea' def _postprocessing(self): if not '_rows' in self.attributes: self['_rows'] = 10 if not '_cols' in self.attributes: self['_cols'] = 40 |
︙ | |||
1666 1667 1668 1669 1670 1671 1672 | 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 | - + | if isinstance(c, OPTGROUP): component_list.append(c.components) else: component_list.append([c]) options = itertools.chain(*component_list) value = self['value'] |
︙ | |||
1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 | 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 | + - + + + + + - - + + - + | tag = 'form' def __init__(self, *components, **attributes): DIV.__init__(self, *components, **attributes) self.vars = Storage() self.errors = Storage() self.latest = Storage() self.accepted = None # none for not submitted def accepts( self, |
︙ | |||
1765 1766 1767 1768 1769 1770 1771 | 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 | - + - + + | 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) |
︙ | |||
1814 1815 1816 1817 1818 1819 1820 | 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 | - + - - - - - - - - - - - - + - + - - + + - + - - - - - - + + + + + + + + + + + + + + + - + + + + - + + + + + + + + - + | 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) |
︙ | |||
1899 1900 1901 1902 1903 1904 1905 | 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 | - - + + + | 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) |
︙ | |||
2160 2161 2162 2163 2164 2165 2166 | 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 | - + + - + + | 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 |
︙ | |||
2200 2201 2202 2203 2204 2205 2206 | 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 | - + - - + + | return text class MARKMIN(XmlComponent): """ For documentation: http://web2py.com/examples/static/markmin.html """ |
︙ | |||
2232 2233 2234 2235 2236 2237 2238 2239 | 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 | + + | """ return [self.text] if __name__ == '__main__': import doctest doctest.testmod() |
Added gluon/html.pyc version [8f42eff40f].
Modified gluon/http.py
from [4537bde179]
to [d702443dbf].
︙ | |||
116 117 118 119 120 121 122 123 124 125 126 127 | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | + + + + | def __str__(self): "stringify me" return self.message def redirect(location, how=303): if not location: return 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/http.pyc version [c8d52a9b33].
Modified gluon/import_all.py
from [91c08d2cb3]
to [39dc019a12].
︙ | |||
103 104 105 106 107 108 109 110 | 103 104 105 106 107 108 109 110 111 112 | + + | 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 |
Modified gluon/languages.py
from [1245d246fd]
to [03ebceec94].
︙ | |||
206 207 208 209 210 211 212 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - + - + | 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): |
︙ | |||
246 247 248 249 250 251 252 | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | - + | self.language_file = filename self.t = read_dict(filename) return languages self.language_file = None self.t = {} # ## no language by default return languages |
︙ | |||
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | + + + - + | 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 """ #for some reason languages.py gets executed before gaehandler.py # is able to set web2py_runtime_gae, so re-check here is_gae = settings.global_settings.web2py_runtime_gae 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) |
︙ | |||
340 341 342 343 344 345 346 347 348 | 343 344 345 346 347 348 349 350 351 352 353 | + + | for language in listdir(path, '^\w+(\-\w+)?\.py$'): findT(application_path, language[:-3]) if __name__ == '__main__': import doctest doctest.testmod() |
Added gluon/languages.pyc version [cc4448c9de].
Modified gluon/main.py
from [a23025057a]
to [414838077d].
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | - + | import datetime import signal import socket import tempfile import random import string import platform |
︙ | |||
99 100 101 102 103 104 105 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | - + + | # 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') |
︙ | |||
414 415 416 417 418 419 420 | 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | - - - + + + + - - + + | # ################################################## 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: |
︙ | |||
442 443 444 445 446 447 448 | 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | - + + - + + | parse_get_post_vars(request, environ) # ################################################## # expose wsgi hooks for convenience # ################################################## request.wsgi.environ = environ_aux(environ,request) |
︙ | |||
467 468 469 470 471 472 473 | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | - + + | session.connect(request, response) # ################################################## # set no-cache headers # ################################################## |
︙ | |||
546 547 548 549 550 551 552 | 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | - - + + | ticket = e.log(request) or 'unknown' if response._custom_rollback: response._custom_rollback() else: BaseAdapter.close_all_instances('rollback') http_response = \ |
︙ | |||
569 570 571 572 573 574 575 | 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 | - - + + - + + - + | else: BaseAdapter.close_all_instances('rollback') except: pass e = RestrictedError('Framework', '', '', locals()) ticket = e.log(request) or 'unrecoverable' http_response = \ |
︙ | |||
714 715 716 717 718 719 720 721 722 723 724 725 726 727 | 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 | + | port=8000, password='', pid_filename='httpserver.pid', log_filename='httpserver.log', profiler_filename=None, ssl_certificate=None, ssl_private_key=None, ssl_ca_certificate=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, |
︙ | |||
765 766 767 768 769 770 771 772 773 774 775 776 777 778 | 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 | + + + | 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]) if ssl_ca_certificate: sock_list.append(ssl_ca_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', |
︙ | |||
803 804 805 806 807 808 809 810 | 813 814 815 816 817 818 819 820 821 822 | + + | """ newcron.stopcron() self.server.stop(stoplogging) try: os.unlink(self.pid_filename) except: pass |
Added gluon/main.pyc version [7db36fceca].
Modified gluon/myregex.py
from [a8dd66dbcb]
to [9e69d6c53a].
︙ | |||
22 23 24 25 26 27 28 29 | 22 23 24 25 26 27 28 29 30 31 | + + | 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/myregex.pyc version [e888c61100].
Modified gluon/newcron.py
from [196ddfcd9f]
to [bdd245f2ad].
︙ | |||
91 92 93 94 95 96 97 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + | 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" """ |
︙ | |||
225 226 227 228 229 230 231 | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | - + | (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') |
︙ | |||
306 307 308 309 310 311 312 313 | 306 307 308 309 310 311 312 313 314 315 | + + | 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/newcron.pyc version [ad7a061b21].
Modified gluon/portalocker.py
from [65a3d73919]
to [91f1b9e40f].
︙ | |||
116 117 118 119 120 121 122 123 | 116 117 118 119 120 121 122 123 124 125 | + + | 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/portalocker.pyc version [9f3bbb0a55].
Modified gluon/reserved_sql_keywords.py
from [b06be514b4]
to [87dbdea57f].
︙ | |||
1707 1708 1709 1710 1711 1712 1713 1714 | 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 | + + | '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())) |
Modified gluon/restricted.py
from [610deece4c]
to [4c53576dff].
︙ | |||
108 109 110 111 112 113 114 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | - + - + + - + + - | """ def __init__( self, layer='', code='', output='', |
︙ | |||
173 174 175 176 177 178 179 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | - + + | 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') |
︙ | |||
279 280 281 282 283 284 285 286 | 281 282 283 284 285 286 287 288 289 290 | + + | # add web2py environment variables for k,v in environment.items(): if k in ('request', 'response', 'session'): s[k] = BEAUTIFY(v) return s |
Added gluon/restricted.pyc version [52584fef22].
Modified gluon/rewrite.py
from [a3895bf0e7]
to [f70728e92c].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + | "return new copy of default base router" router = Storage( default_application = 'init', applications = 'ALL', default_controller = 'default', controllers = 'DEFAULT', default_function = 'index', |
︙ | |||
361 362 363 364 365 366 367 | 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 | - - - - + + + - + + + + + + | 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) |
︙ | |||
421 422 423 424 425 426 427 428 | 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | + - + + + - + | 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 fcn = None if '/' in app: |
︙ | |||
750 751 752 753 754 755 756 | 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | - + | self.application = None self.language = None self.controller = None self.function = None self.extension = 'html' self.controllers = set() |
︙ | |||
806 807 808 809 810 811 812 813 | 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 | + - - - - + + + - + + + + | 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 self.domain_function = None arg0 = self.harg0 |
︙ | |||
924 925 926 927 928 929 930 | 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | - - + + + + + + + + | 'static', file) logger.debug("route: static=%s" % static_file) return static_file def map_function(self): "handle function.extension" arg0 = self.harg0 # map hyphens |
︙ | |||
1019 1020 1021 1022 1023 1024 1025 | 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 | - + + + + - + | self.other = other self.scheme = scheme self.host = host self.port = port self.applications = routers.BASE.applications self.controllers = self.router.controllers |
︙ | |||
1058 1059 1060 1061 1062 1063 1064 | 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 | - + - + - + | 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 / # |
︙ | |||
1201 1202 1203 1204 1205 1206 1207 | 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 | - + + + | 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 |
Added gluon/rewrite.pyc version [1f6cf594b7].
Modified gluon/rocket.py
from [069a2f3dcb]
to [cb29338f3f].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + + - + | # -*- coding: utf-8 -*- # This file is part of the Rocket Web Server |
︙ | |||
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | + + + - + + + + + | import time import socket try: import ssl has_ssl = True except ImportError: has_ssl = False # Import Package Modules # package imports removed in monolithic build # TODO - This part is still very experimental. #from .filelike import FileLikeSocket class Connection(object): __slots__ = [ 'setblocking', 'sendall', 'shutdown', 'makefile', 'fileno', 'client_addr', 'client_port', 'server_port', 'socket', 'start_time', 'ssl', |
︙ | |||
120 121 122 123 124 125 126 127 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 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 | + + + - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | 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.setblocking = self.socket.setblocking self.recv = self.socket.recv self.send = self.socket.send self.makefile = self.socket.makefile |
︙ | |||
168 169 170 171 172 173 174 | 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | - - - + + + + | Thread.__init__(self, *args, **kwargs) # Instance variables self.active_queue = active_queue self.interface = interface self.addr = interface[0] self.port = interface[1] |
︙ | |||
199 200 201 202 203 204 205 206 207 208 209 210 211 212 | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | + + + + + + | 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 if self.clientcert_req and not os.path.exists(interface[4]): data = (interface[4], interface[0], interface[1]) self.err_log.error("Cannot find root ca 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)) |
︙ | |||
234 235 236 237 238 239 240 | 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 | + + + - - - - - + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + | self.listener = listener self.ready = True def wrap_socket(self, sock): try: if self.clientcert_req: ca_certs = self.interface[4] cert_reqs = ssl.CERT_OPTIONAL |
︙ | |||
277 278 279 280 281 282 283 | 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 | - + - + | if not self.ready: if __debug__: self.err_log.debug('Listener exiting.') return else: continue except: |
︙ | |||
320 321 322 323 324 325 326 327 328 329 330 331 332 333 | 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | + + | min_threads = None, max_threads = None, queue_size = None, timeout = 600, handle_signals = True): self.handle_signals = handle_signals self.startstop_lock = Lock() self.timeout = timeout if not isinstance(interfaces, list): self.interfaces = [interfaces] else: self.interfaces = interfaces if min_threads is None: |
︙ | |||
344 345 346 347 348 349 350 | 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 | - - + + - - - - - - + + + + - + - + + + + - - - - - - - - + + + + + + + + - - + + - - - + + + + + + + - - - + + + - - - + + + - - + + + - - + + + + - + - - - + + - - + + + + + - - - - - + + + + + + + + + + - - - - - - - + + + + + + + - - + + + + + + + + + + + + + - + | if max_threads and queue_size > max_threads: queue_size = max_threads if isinstance(app_info, dict): app_info['server_software'] = SERVER_SOFTWARE |
︙ | |||
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | 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 | + + + + + + - - - - + + + + + - + + - + - + - - - - + + + + - - - + + + + - - - - + + + + - - - - - + + + + + - - + + - - + + + + + + + + | class Monitor(Thread): # Monitor worker class. def __init__(self, monitor_queue, active_queue, timeout, threadpool, *args, **kwargs): Thread.__init__(self, *args, **kwargs) self._threadpool = threadpool # Instance Variables self.monitor_queue = monitor_queue self.active_queue = active_queue self.timeout = timeout self.log = logging.getLogger('Rocket.Monitor') self.log.addHandler(NullHandler()) self.connections = set() self.active = False def run(self): |
︙ | |||
593 594 595 596 597 598 599 600 601 602 603 604 605 606 | 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 | + + + + - + + | self.connections.remove(c) list_changed = True try: c.close() finally: del c # Dynamically resize the threadpool to adapt to our changing needs. self._threadpool.dynamic_resize() def stop(self): self.active = False if __debug__: self.log.debug('Flushing waiting connections') |
︙ | |||
630 631 632 633 634 635 636 637 638 639 640 641 642 643 | 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 | + | # 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 |
︙ | |||
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 | 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 | + + + + + + - - - - - - - - + + + + + - - + + + + + + + + - - + + + + + - + | 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 self.alive = 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() if has_futures and app_info.get('futures'): app_info['executor'] = WSGIExecutor(max([DEFAULTS['MIN_THREADS'], 2])) app_info.update(max_threads=max_threads, min_threads=min_threads) self.min_threads = min_threads self.app_info = app_info self.threads = set() |
︙ | |||
729 730 731 732 733 734 735 | 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 | + - + | def grow(self, amount=None): if self.stop_server: return if not amount: amount = self.max_threads if self.alive: |
︙ | |||
780 781 782 783 784 785 786 | 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 | - + | # Import System Modules import re import sys import socket import logging import traceback |
︙ | |||
833 834 835 836 837 838 839 | 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Content-Type: %s %s ''' if IS_JYTHON: HTTP_METHODS = set(['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONNECT']) |
︙ | |||
974 975 976 977 978 979 980 981 982 983 984 985 986 987 | 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 | + | 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 self.request_line = "" # 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()) |
︙ | |||
1105 1106 1107 1108 1109 1110 1111 | 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 | - - - - - - - - + + + + + + + + | 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) |
︙ | |||
1205 1206 1207 1208 1209 1210 1211 | 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 | + - - + + - - - - - - - - + + + + + + + + - - + + - - - - - - - + + + + + + + - - - + + + - + + + + | query_string=query_string, scheme=scheme.lower(), host=host) return req def read_headers(self, sock_file): try: |
︙ | |||
1296 1297 1298 1299 1300 1301 1302 | 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 | + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + | return data def readlines(self): yield self.readline() def get_method(method): |
︙ | |||
1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 | 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 | + + + + + + | 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)) # Enable futures if has_futures and self.app_info.get('futures'): executor = self.app_info['executor'] self.base_environ.update({"wsgiorg.executor": executor, "wsgiorg.futures": executor.futures}) 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 |
︙ | |||
1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 | 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 | + + + + + + + + | # Add Dynamic WSGI Variables if conn.ssl: environ['wsgi.url_scheme'] = 'https' environ['HTTPS'] = 'on' else: environ['wsgi.url_scheme'] = 'http' if conn.ssl: try: peercert = conn.socket.getpeercert(binary_form=True) environ['SSL_CLIENT_RAW_CERT'] = \ peercert and ssl.DER_cert_to_PEM_cert(peercert) except Exception,e: print e if environ.get('HTTP_TRANSFER_ENCODING', '') == 'chunked': environ['wsgi.input'] = ChunkedReader(sock_file) else: environ['wsgi.input'] = sock_file return environ |
︙ | |||
1520 1521 1522 1523 1524 1525 1526 | 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 | + + + - + | sections = None output = None if __debug__: self.err_log.debug('Getting sock_file') # Build our file-like object if PY3K: sock_file = conn.makefile(mode='rb', buffering=BUF_SIZE) else: |
︙ | |||
1583 1584 1585 1586 1587 1588 1589 | 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 | - + - - - - | 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: |
︙ |
Added gluon/rocket.pyc version [30fb9fab51].
Modified gluon/sanitizer.py
from [a160c3e797]
to [393e02e106].
︙ | |||
218 219 220 221 222 223 224 225 | 218 219 220 221 222 223 224 225 226 227 | + + | '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/sanitizer.pyc version [d789c7453f].
Added gluon/scheduler.py version [b19c6df200].
Modified gluon/serializers.py
from [4a4a474858]
to [aeb8c6ffcb].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - - + + + + + + + + + | """ 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 |
︙ | |||
46 47 48 49 50 51 52 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + | 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): |
︙ | |||
71 72 73 74 75 76 77 78 | 78 79 80 81 82 83 84 85 86 87 | + + | description=entry['description'], pubDate=entry.get('created_on', now) )\ for entry in feed['entries'] ] ) return rss2.dumps(rss) |
Added gluon/serializers.pyc version [50c93bfb9c].
Modified gluon/settings.py
from [5c78f2495b]
to [f43a3ef62c].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | + + | """ 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/settings.pyc version [ee34a24607].
Modified gluon/shell.py
from [e6d16bd699]
to [20bba43f9c].
︙ | |||
13 14 15 16 17 18 19 | 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 sys import code import logging import types import re import optparse import glob |
︙ | |||
46 47 48 49 50 51 52 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | - - - + + + | 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. """ |
︙ | |||
146 147 148 149 150 151 152 | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | - + + | def run( appname, plain=False, import_models=False, startfile=None, |
︙ | |||
198 199 200 201 202 203 204 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | + - - + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + | if f: exec ('print %s()' % f, _env) elif startfile: exec_pythonrc() try: execfile(startfile, _env) if import_models: BaseAdapter.close_all_instances('commit') |
︙ | |||
393 394 395 396 397 398 399 400 | 412 413 414 415 416 417 418 419 420 421 | + + | else: startfile = '' run(options.shell, options.plain, startfile=startfile, bpython=options.bpython) if __name__ == '__main__': execute_from_command_line() |
Added gluon/shell.pyc version [cb888418ec].
Modified gluon/sql.py
from [8df4f4f856]
to [e7fa972eb8].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 | + + | # 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 |
Modified gluon/sqlhtml.py
from [aa2336d433]
to [086b79de71].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + - - + + - | - 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 |
︙ | |||
107 108 109 110 111 112 113 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | - + | generates an INPUT text tag. see also: :meth:`FormWidget.widget` """ default = dict( _type = 'text', |
︙ | |||
290 291 292 293 294 295 296 | 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 | - + + - + + + + + + + + + + + - - - - - + + + + + + + - + - + + + + + + + + + + - - - - - + + + + + + + + - + | def widget(field, value, **attributes): """ generates a TABLE tag, including INPUT radios (only 1 option allowed) see also: :meth:`FormWidget.widget` """ |
︙ | |||
432 433 434 435 436 437 438 | 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 | + + + - + - - - + + + + + | _type='file', ) attr = UploadWidget._attributes(field, default, **attributes) inp = INPUT(**attr) if download_url and value: if callable(download_url): url = download_url(value) else: |
︙ | |||
470 471 472 473 474 475 476 | 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | + + + - + | :param value: the field value :param download_url: url for the file download (default = None) """ inp = UploadWidget.GENERIC_DESCRIPTION if download_url and value: if callable(download_url): url = download_url(value) else: |
︙ | |||
513 514 515 516 517 518 519 | 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | - + | self.fields=[field] if id_field: self.is_reference = True self.fields.append(id_field) else: self.is_reference = False if hasattr(request,'application'): |
︙ | |||
542 543 544 545 546 547 548 | 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | - + | for k,s in enumerate(rows)]).xml()) else: raise HTTP(200,'') def __call__(self,field,value,**attributes): default = dict( _type = 'text', |
︙ | |||
683 684 685 686 687 688 689 | 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 | - + - + | **attributes ): """ SQLFORM(db.table, record=None, fields=['name'], labels={'name': 'Your name'}, |
︙ | |||
734 735 736 737 738 739 740 | 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 | - + - + - + - + | self.custom.inpval = Storage() self.custom.label = Storage() self.custom.comment = Storage() self.custom.widget = Storage() self.custom.linkto = Storage() sep = separator or '' |
︙ | |||
1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | 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 | + + + + - + - - - - + + - + - + | 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 if field.type.startswith('list:') and \ isinstance(value, str): value = [value] 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 self.accepted = ret 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) |
︙ | |||
1162 1163 1164 1165 1166 1167 1168 | 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 | - + + - + - + - + - + - + + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | 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] |
︙ | |||
1275 1276 1277 1278 1279 1280 1281 | 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 | - + - + - + - + - + - - + + - + - + - + + - + - + - + - + - - + + - + | This will link rows[id] to .../sometable/value_of_id More advanced linkto example:: def mylink(field, type, ref): |
︙ | |||
1459 1460 1461 1462 1463 1464 1465 | 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 | - + - + - + - + - + - + - + - + - - + + - + - + + + | 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)) |
Added gluon/sqlhtml.pyc version [b9c43229a5].
Modified gluon/storage.py
from [01254dd1ce]
to [e0d0b25798].
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + | def __getattr__(self, key): if key in self: return self[key] else: return None def __setattr__(self, key, value): |
︙ | |||
217 218 219 220 221 222 223 224 | 217 218 219 220 221 222 223 224 225 226 | + + | if isinstance(value, str): return str(self['T'](value)) return value if __name__ == '__main__': import doctest doctest.testmod() |
Added gluon/storage.pyc version [a1d5b27c69].
Modified gluon/streamer.py
from [10f9ac82a7]
to [833f1efd4c].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | - - + + | 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 |
︙ | |||
102 103 104 105 106 107 108 109 | 102 103 104 105 106 107 108 109 110 111 | + + | 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/streamer.pyc version [59d659d0b5].
Modified gluon/template.py
from [851c8388c4]
to [428131a179].
︙ | |||
924 925 926 927 928 929 930 931 | 924 925 926 927 928 929 930 931 932 933 | + + | # Returned the rendered content. return context['response'].body.getvalue() if __name__ == '__main__': import doctest doctest.testmod() |
Added gluon/template.pyc version [892f7ab761].
Modified gluon/tests/test_router.py
from [ca0892ab11]
to [5e9353a27f].
︙ | |||
336 337 338 339 340 341 342 | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | - + | 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') |
︙ | |||
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | 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 | + + + - + + | "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", # two domains, same app & controller, two functions "domain4a.com" : "app4/c4/f4a", "domain4b.com" : "app4/c4/f4b", # 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'], ), |
︙ | |||
416 417 418 419 420 421 422 | 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | - - + + + + + | 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") |
︙ | |||
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 | + - + + + + + + + + + + + + + - + - - + | default_application = 'app', ), init = dict( controllers = ['default'], ), app = dict( controllers = ['default', 'ctr'], functions = dict( |
︙ | |||
691 692 693 694 695 696 697 | 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 | - + | 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'])) |
︙ |
Modified gluon/tools.py
from [af2a86f800]
to [1e8e80315e].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - - + - + + + + + + + - + + + | import datetime import thread import logging import sys import os import re import time |
︙ | |||
58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | + + + + + + + + + | return b def call_or_redirect(f,*args): if callable(f): redirect(f(*args)) else: redirect(f) def replace_id(url, form): if url and not url[0] == '/' and url[:4] != 'http': # this is here for backward compatibility return URL(url.replace('[id]', str(form.vars.id))) elif url: # this allows http://..../%(id)s/%(name)s/etc. return url % form.vars return url 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. |
︙ | |||
123 124 125 126 127 128 129 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - + - + - + - + | self, payload, filename=None, content_id=None, content_type=None, encoding='utf-8'): if isinstance(payload, str): |
︙ | |||
317 318 319 320 321 322 323 | 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 | - + - + - + - + - + | 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] |
︙ | |||
429 430 431 432 433 434 435 | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | - + | 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() |
︙ | |||
544 545 546 547 548 549 550 | 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 | - - - + + + + - + - + - + - + | 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': |
︙ | |||
682 683 684 685 686 687 688 | 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 | - + | if not self.errors.captcha: return XML(captcha).xml() else: captcha.append(DIV(self.errors['captcha'], _class='error')) return XML(captcha).xml() |
︙ | |||
720 721 722 723 724 725 726 | 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 | - + | 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' |
︙ | |||
785 786 787 788 789 790 791 792 | 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 | + + + + + + + + + + + - - + + + + + + + - - + + - + - + + + + | ... ### these are messages that can be customized ... """ @staticmethod def get_or_create_key(filename=None): request = current.request if not filename: filename = os.path.join(request.folder,'private','auth.key') if os.path.exists(filename): key = open(filename,'r').read().strip() else: key = web2py_uuid() open(filename,'w').write(key) return key |
︙ | |||
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 | 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 | + + + + + + - + | auth.last_visit = request.now else: self.user = None session.auth = None settings = self.settings = Settings() # ## what happens after login? self.next = current.request.vars._next if isinstance(self.next,(list,tuple)): self.next = self.next[0] # ## what happens after registration? settings.hideerror = False settings.password_min_length = 4 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.login_after_registration = 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') |
︙ | |||
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 | 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 | + - + - | 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.register_verify_password = True 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 = [] |
︙ | |||
948 949 950 951 952 953 954 | 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 | + + - + + + - + | 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://' + current.request.env.http_host + \ URL('default','user',args=['verify_email']) + \ |
︙ | |||
1000 1001 1002 1003 1004 1005 1006 | 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 | - + | 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' |
︙ | |||
1077 1078 1079 1080 1081 1082 1083 | 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 | - + + - + | '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) |
︙ | |||
1108 1109 1110 1111 1112 1113 1114 | 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 | - + | 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') |
︙ | |||
1207 1208 1209 1210 1211 1212 1213 | 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 | - + + + | 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) |
︙ | |||
1268 1269 1270 1271 1272 1273 1274 | 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 | - + | 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) |
︙ | |||
1332 1333 1334 1335 1336 1337 1338 | 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 | - + - - + + + + - + - | settings.login_form = CasAuth( casversion = 2, urlbase = settings.cas_provider, actions=['login','validate','logout'], maps=maps) |
︙ | |||
1447 1448 1449 1450 1451 1452 1453 | 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 | - + - - + - + | allow_access() def cas_onaccept(form, onaccept=onaccept): if onaccept!=DEFAULT: onaccept(form) allow_access() return self.login(next,onvalidation,cas_onaccept,log) |
︙ | |||
1513 1514 1515 1516 1517 1518 1519 1520 | 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 | + + + + + + + + + + - - - + - + | table_user[username].requires = tmpvalidator request = current.request response = current.response session = current.session passfield = self.settings.password_field try: table_user[passfield].requires[-1].min_length = 0 except: pass ### use session for federated login if self.next: session._auth_next = self.next elif session._auth_next: self.next = session._auth_next ### pass if next == DEFAULT: |
︙ | |||
1559 1560 1561 1562 1563 1564 1565 | 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 | - + + - + | )),"", self.settings.formstyle, 'auth_user_remember__row') captcha = self.settings.login_captcha or \ (self.settings.login_captcha!=False and self.settings.captcha) if captcha: |
︙ | |||
1617 1618 1619 1620 1621 1622 1623 | 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 | - - + + - + + - + - + - - - - + - - - + - - + + - - + + - - - + | 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: |
︙ | |||
1728 1729 1730 1731 1732 1733 1734 | 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 | - - - + - - + + - + + - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + | 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: |
︙ | |||
1786 1787 1788 1789 1790 1791 1792 | 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 | - + - - + + + + - - + - - + + - - | 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 |
︙ | |||
1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 | 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 | + + + - - + | 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 # make sure session has same user.registrato_key as db record if current.session.auth and current.session.auth.user: current.session.auth.user.registration_key = user.registration_key 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 |
︙ | |||
1890 1891 1892 1893 1894 1895 1896 | 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 | - - - + - + | 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: |
︙ | |||
1928 1929 1930 1931 1932 1933 1934 | 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 | - - + - - + + - - | 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 |
︙ | |||
1976 1977 1978 1979 1980 1981 1982 | 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 | - - - + - + | request = current.request response = current.response session = current.session if not self.settings.mailer: response.flash = self.messages.function_disabled return '' if next == DEFAULT: |
︙ | |||
2022 2023 2024 2025 2026 2027 2028 | 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 | - - + - - + + - - | 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 |
︙ | |||
2056 2057 2058 2059 2060 2061 2062 | 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 | - - - + - + | table_user = self.settings.table_user request = current.request # response = current.response session = current.session if next == DEFAULT: |
︙ | |||
2113 2114 2115 2116 2117 2118 2119 | 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 | - - - + - - - + | 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: |
︙ | |||
2163 2164 2165 2166 2167 2168 2169 | 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 | - - + - - + + - - | 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 |
︙ | |||
2212 2213 2214 2215 2216 2217 2218 | 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 | - - - + | 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: |
︙ | |||
2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 | 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 | + - - + - - + + - - | 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, hidden = dict(_next=next), 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 |
︙ | |||
2282 2283 2284 2285 2286 2287 2288 | 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 | - - - + - + - - + - - + + - - | 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: |
︙ | |||
2356 2357 2358 2359 2360 2361 2362 | 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 | - - + - + | 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 |
︙ | |||
2391 2392 2393 2394 2395 2396 2397 | 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 | - + + - - - + + + + - - - + + + - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - + + + - - + - + - - + - - + - - | return None return table def not_authorized(self): """ you can change the view for this page to make it look as you like """ |
︙ | |||
2643 2644 2645 2646 2647 2648 2649 | 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 | - + - - - + - + - + - - - + - + - + - - - + | 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 |
︙ | |||
2733 2734 2735 2736 2737 2738 2739 | 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 | + - + - - - + + - + - - - - + + + - + - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + | == 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 if user_id: |
︙ | |||
2893 2894 2895 2896 2897 2898 2899 | 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 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - | elif args[0] == 'update': return self.update(table, args(2)) elif args[0] == 'delete': return self.delete(table, args(2)) else: raise HTTP(404) |
︙ | |||
3006 3007 3008 3009 3010 3011 3012 | 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 | - - + - + | 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) |
︙ | |||
3045 3046 3047 3048 3049 3050 3051 | 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 | - + - - + - - - + - + - - + - | deletable=deletable, upload=self.settings.download_url, formstyle=self.settings.formstyle, separator=self.settings.label_separator ) self.accepted = False self.deleted = False |
︙ | |||
3186 3187 3188 3189 3190 3191 3192 | 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 | - - + - | 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 |
︙ | |||
3221 3222 3223 3224 3225 3226 3227 | 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 | - + + | def select( self, table, query=None, fields=None, orderby=None, limitby=None, |
︙ | |||
3285 3286 3287 3288 3289 3290 3291 | 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 | - | if not refsearch: return field.like('%'+value+'%') else: return lambda row: value in row[field.name][format] except: return None |
︙ | |||
3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 | 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 | + + + + + + + | 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 = [] showall = args.get('showall', False) if showall: selected = fields chkall = args.get('chkall', False) if chkall: for f in fields: request.vars['chk%s'%f] = 'on' 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) |
︙ | |||
3365 3366 3367 3368 3369 3370 3371 | 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 | - + + - + - + | except: # hmmm, we should do better here results = None return form, results urllib2.install_opener(urllib2.build_opener(urllib2.HTTPCookieProcessor())) |
︙ | |||
3460 3461 3462 3463 3464 3465 3466 | 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 | - + - + - + - + - + - + - + - + - + | self.amfrpc3_procedures = {} self.soap_procedures = {} def run(self, f): """ example:: |
︙ | |||
3641 3642 3643 3644 3645 3646 3647 | 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 | - + | return f return _amfrpc3 def soap(self, name=None, returns=None, args=None,doc=None): """ example:: |
︙ | |||
3685 3686 3687 3688 3689 3690 3691 | 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 | - + | 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', ' ') |
︙ | |||
3739 3740 3741 3742 3743 3744 3745 | 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 | - + - - + + - + | 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 |
︙ | |||
3889 3890 3891 3892 3893 3894 3895 | 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 | - + - | for method, doc in dispatcher.list_methods()]), ] return {'body': body} def __call__(self): """ register services with: |
︙ | |||
4095 4096 4097 4098 4099 4100 4101 | 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 | - + + - | finally: lock.release() def __init__(self,plugin=None,**defaults): if not plugin: self.__dict__.clear() settings = self.__getattr__(plugin) settings.installed = True |
Added gluon/tools.pyc version [3a8feefb6f].
Modified gluon/utils.py
from [c924bf11cb]
to [cd84275670].
︙ | |||
120 121 122 123 124 125 126 127 | 120 121 122 123 124 125 126 127 128 129 | + + | 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/utils.pyc version [59bcf5d046].
Modified gluon/validators.py
from [0b976e1d6d]
to [59f9c2fdd4].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | import time import cgi import urllib import struct import decimal import unicodedata from cStringIO import StringIO |
︙ | |||
117 118 119 120 121 122 123 124 125 126 127 128 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | + + + + + + + + + + + + + + + + + + - + + + + - + | INPUT(_type='text', _name='name', requires=IS_MATCH('.+')) the argument of IS_MATCH is a regular expression:: >>> IS_MATCH('.+')('hello') ('hello', None) >>> IS_MATCH('hell')('hello') ('hello', 'invalid expression') >>> IS_MATCH('hell.*', strict=False)('hello') ('hello', None) >>> IS_MATCH('hello')('shello') ('shello', 'invalid expression') >>> IS_MATCH('hello', search=True)('shello') ('hello', None) >>> IS_MATCH('hello', search=True, strict=False)('shellox') ('hello', None) >>> IS_MATCH('.*hello.*', search=True, strict=False)('shellox') ('shellox', None) >>> IS_MATCH('.+')('') ('', 'invalid expression') """ |
︙ | |||
314 315 316 317 318 319 320 | 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 | - + - + | 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) |
︙ | |||
435 436 437 438 439 440 441 | 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 | - + - + | 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) |
︙ | |||
605 606 607 608 609 610 611 612 613 614 615 616 617 618 | 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | + + + + + | return (value, None) elif self.minimum <= value < self.maximum: return (value, None) except ValueError: pass return (value, self.error_message) def str2dec(number): s = str(number) if not '.' in s: s+='.00' else: s+='0'*(2-len(s.split('.')[1])) return s 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. |
︙ | |||
693 694 695 696 697 698 699 | 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 | - - - - + | elif self.minimum <= fvalue <= self.maximum: return (fvalue, None) except (ValueError, TypeError): pass return (value, self.error_message) def formatter(self,value): |
︙ | |||
800 801 802 803 804 805 806 | 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 | - + - + | elif self.minimum <= v <= self.maximum: return (v, None) except (ValueError, TypeError, decimal.InvalidOperation): pass return (value, self.error_message) def formatter(self, value): |
︙ | |||
1342 1343 1344 1345 1346 1347 1348 | 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 | - + | :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 |
︙ | |||
1371 1372 1373 1374 1375 1376 1377 | 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 | - + - + | # 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 |
︙ | |||
1757 1758 1759 1760 1761 1762 1763 | 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 | - + | :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 |
︙ | |||
1787 1788 1789 1790 1791 1792 1793 | 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 | - + | """ 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) |
︙ | |||
1826 1827 1828 1829 1830 1831 1832 | 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 | - + | # 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 |
︙ | |||
1982 1983 1984 1985 1986 1987 1988 | 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 | - + | 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 |
︙ | |||
2042 2043 2044 2045 2046 2047 2048 | 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 | - + - + | 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) |
︙ | |||
2476 2477 2478 2479 2480 2481 2482 2483 2484 | 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 | + + + + + + - + + + + + + + | 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. min_length is the minimal password length (default 4) - IS_STRONG for serious security error_message is the message if password is too short Notice that an empty password is accepted but invalid. It will not allow login back. Stores junk as hashed password. """ |
︙ | |||
2911 2912 2913 2914 2915 2916 2917 | 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 | - + - + - + + + | 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 |
Added gluon/validators.pyc version [4ee16a78b6].
Modified gluon/widget.py
from [1adeccc7f3]
to [6fe94e9bd5].
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + - |
|
︙ | |||
108 109 110 111 112 113 114 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | + + - - - - - + + + + + | canvas = Tkinter.Canvas(dialog, background='white', width=500, height=300) canvas.pack() root.update() logo = 'splashlogo.gif' if os.path.exists(logo): |
︙ | |||
217 218 219 220 221 222 223 | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | - + | 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()) |
︙ | |||
317 318 319 320 321 322 323 | 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | - + | try: self.tb.Destroy() except: pass self.root.destroy() |
︙ | |||
484 485 486 487 488 489 490 491 492 493 494 495 496 497 | 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 | + + + + + + | parser.add_option('-k', '--ssl_private_key', default='', dest='ssl_private_key', help='file that contains ssl private key') parser.add_option('--ca-cert', action='store', dest='ssl_ca_certificate', default=None, help='Use this file containing the CA certificate to validate X509 certificates from clients') 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', |
︙ | |||
615 616 617 618 619 620 621 622 623 624 625 626 627 628 | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | + + + + + + + + + | msg += ' should be used with --shell option' parser.add_option('-R', '--run', dest='run', metavar='PYTHON_FILE', default='', help=msg) msg = 'run scheduled tasks for the specified apps' msg += '-K app1,app2,app3' msg += 'requires a scheduler defined in the models' parser.add_option('-K', '--scheduler', dest='scheduler', default=None, 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', |
︙ | |||
699 700 701 702 703 704 705 | 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 | + - + | parser.add_option('--no-banner', action='store_true', default=False, dest='nobanner', help='Do not print header banner') |
︙ | |||
732 733 734 735 736 737 738 | 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 | - + + - + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + | 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) |
︙ | |||
796 797 798 799 800 801 802 803 804 805 | 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 | + + + + + + + + - + | 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 -K if options.scheduler: try: start_schedulers(options) except KeyboardInterrupt: pass return # ## if -S start interactive shell (also no cron) if options.shell: |
︙ | |||
901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 | 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 | + + + | 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, ssl_ca_certificate=options.ssl_ca_certificate, 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/widget.pyc version [5fe6811bf3].
Modified gluon/winservice.py
from [e1ec3d2e01]
to [c975849a71].
︙ | |||
157 158 159 160 161 162 163 164 | 157 158 159 160 161 162 163 164 165 166 | + + | serviceClassString=classstring, argv=['', 'install']) win32serviceutil.HandleCommandLine(Web2pyService, serviceClassString=classstring, argv=argv) if __name__ == '__main__': web2py_windows_service_handler() |
Modified gluon/xmlrpc.py
from [ae09470e68]
to [1514bfb6b9].
︙ | |||
15 16 17 18 19 20 21 22 | 15 16 17 18 19 20 21 22 23 24 | + + | 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 gluon/xmlrpc.pyc version [6e66be7d0b].
Added isapiwsgihandler.py version [bfc5478b76].
Modified modpythonhandler.py
from [72691ad73a]
to [416a807373].
︙ | |||
218 219 220 221 222 223 224 | 218 219 220 221 222 223 224 225 | + | def handler(req): """ Execute the gluon app """ Handler(req).run(gluon.main.wsgibase) return apache.OK |
Modified options_std.py
from [2c6b93cdaf]
to [52a1ee322a].
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 | + | server_name = socket.gethostname() request_queue_size = 5 timeout = 30 shutdown_timeout = 5 folder = os.getcwd() extcron = None nocron = None |
Modified router.example.py
from [c5219c298b]
to [3c04e682e7].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - - + + - - - - + + + + + - + - + + - - - - + + + + + - - + + - - - - - + + + + + - + | # 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 |
︙ | |||
179 180 181 182 183 184 185 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - + + | '/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' |
Modified routes.example.py
from [1f6aac3108]
to [65d7dd7768].
︙ | |||
159 160 161 162 163 164 165 | 159 160 161 162 163 164 165 166 | + | '/init/\\\\g<c>/\\\\g<f>' ''' pass if __name__ == '__main__': import doctest doctest.testmod() |
Modified scgihandler.py
from [4e7a23db5a]
to [dbbd6de105].
1 2 3 4 5 6 7 8 9 10 11 12 | 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 -*- """ 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> |
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 | + | 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/cleanjs.py version [39f912b954].
Added scripts/dbsessions2trash.py version [2744c716b7].
Added scripts/make_min_web2py.py version [985a57dae4].
Added scripts/sessions2trash.py version [7405bf23ba].
Added scripts/standalone_exe_cxfreeze.py version [b8ce9fd231].
Added scripts/update_web2py.py version [15d639cdcd].
Modified scripts/web2py.fedora.sh
from [f5d343a911]
to [1f7bae23e0].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - - - - - - - | fi echo return $RETVAL } stop() { echo -n $"Shutting down $DESC ($NAME): " |
︙ |
Modified setup.py
from [e143c2d3be]
to [7163108957].
︙ | |||
60 61 62 63 64 65 66 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + - - - - - - - - - + + + + + + + + + | 'gluon/contrib/pymysql', 'gluon/contrib/pyrtf', 'gluon/contrib/pysimplesoap', 'gluon/contrib/simplejson', 'gluon/tests', ], package_data = {'gluon':['env.tar']}, |
Modified setup_app.py
from [f5b77e5447]
to [b03e3576c0].
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 | + | [x for x in reglob('applications/admin')], options={'py2app': { 'argv_emulation': True, 'includes': base_modules, 'packages': contributed_modules, }}, setup_requires=['py2app']) |
Modified setup_exe.py
from [cc0ba04b6a]
to [8533c30924].
︙ | |||
178 179 180 181 182 183 184 | 178 179 180 181 182 183 184 185 | + | #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 |
Modified setup_exe_2.6.py
from [8ed272e097]
to [5c9c529861].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + | #!/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 |
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + | #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" |
︙ | |||
79 80 81 82 83 84 85 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | - + | 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) |
︙ | |||
109 110 111 112 113 114 115 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - + - + | #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') |
︙ | |||
142 143 144 145 146 147 148 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | - + - + + | 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" |
Modified web2py.py
from [a779743757]
to [e074945d06].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 | + - + + | 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! if __name__ == '__main__': |
Deleted web2py_src.zip version [b21e798e47].
Modified wsgihandler.py
from [7a279d863a]
to [a67672ef28].
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 | + | profilerfilename=None) else: application = gluon.main.wsgibase if SOFTCRON: from gluon.settings import global_settings global_settings.web2py_crontype = 'soft' |