Flask Documentation (1.1.x)
and Context Keeping the Context Around Accessing and Modifying Sessions Testing JSON APIs Testing CLI Commands Application Errors Error Logging Tools Error handlers Logging Debugging Application Errors Blueprint Objects Incoming Request Data Response Objects Sessions Session Interface Test Client Test CLI Runner Application Globals Useful Functions and Classes Message Flashing JSON Support Template Rendering response is sent. flaskr/db.py import sqlite3 import click from flask import current_app, g from flask.cli import with_appcontext def get_db(): if 'db' not in g: g.db = sqlite3.connect(0 码力 | 428 页 | 895.98 KB | 1 年前3Flask Documentation (1.1.x)
Listing 4: flaskr/db.py import sqlite3 import click from flask import current_app, g from flask.cli import with_appcontext def get_db(): if 'db' not in g: g.db = sqlite3.connect( current_app.config['DATABASE'] teardown_appcontext(close_db) app.cli.add_command(init_db_command) app.teardown_appcontext() tells Flask to call that function when cleaning up after returning the response. app.cli.add_command() adds a new command page) def client(app): return app.test_client() @pytest.fixture def runner(app): return app.test_cli_runner() tempfile.mkstemp() creates and opens a temporary file, returning the file object and the0 码力 | 291 页 | 1.25 MB | 1 年前3Python AdminUI
ii Python AdminUI 使用 Python 制作专业的 Web 前端界面 本 Python 包适用于想要制作简单的前端界面,但却不想处理 HTML, CSS, React, Angular, Webpack 和其 他 Javascript 前端代码的情况。你可以直接用 Python 完成网页、表单、图标和仪表盘界面。 一些应用场景:数据项目;运维工具和脚本;简单 IT 系统和0 码力 | 67 页 | 653.37 KB | 1 年前3Django 5.1 Documentation
[https://postgis.net/docs/ST_DistanceSphere.html] on PostGIS). When distances are calculated with geodetic (angular) coordinates, as is the case with the default WGS84 (4326) SRID, you can set the spheroid keyword its length as a Distance measure. On PostGIS and SpatiaLite, when the coordinates are geodetic (angular), you can specify if the calculation should be based on a simple sphere (less accurate, less resource-intensive) of the linear units. angular_name[source] [https://github.com/django/django/blob/stable/5.1.x/django/contrib/gis/gdal/srs. py#L226] Returns the name of the angular units.” angular_units[source] [https://github0 码力 | 3513 页 | 3.17 MB | 1 年前3Django 5.1.2 Documentation
[https://postgis.net/docs/ST_DistanceSphere.html] on PostGIS). When distances are calculated with geodetic (angular) coordinates, as is the case with the default WGS84 (4326) SRID, you can set the spheroid keyword its length as a Distance measure. On PostGIS and SpatiaLite, when the coordinates are geodetic (angular), you can specify if the calculation should be based on a simple sphere (less accurate, less resource-intensive) of the linear units. angular_name[source] [https://github.com/django/django/blob/stable/5.1.x/django/contrib/gis/gdal/srs. py#L226] Returns the name of the angular units.” angular_units[source] [https://github0 码力 | 3519 页 | 3.17 MB | 1 年前3Django 2.1.x Documentation
the geometries (e.g. ST_DistanceSphere on PostGIS). When distances are calculated with geodetic (angular) coordinates, as is the case with the default WGS84 (4326) SRID, you can set the spheroid keyword its length as a Distance measure. On PostGIS and SpatiaLite, when the coordinates are geodetic (angular), you can specify if the calculation should be based on a simple sphere (less accurate, less resource-intensive) linear_units Returns the value of the linear units. angular_name Returns the name of the angular units.” angular_units Returns the value of the angular units. units Returns a 2-tuple of the units value0 码力 | 1910 页 | 6.49 MB | 1 年前3Django 1.11.x Documentation
the geometries (e.g. ST_DistanceSphere on PostGIS). When distances are calculated with geodetic (angular) coordinates, as is the case with the default WGS84 (4326) SRID, you can set the spheroid keyword its length as a Distance measure. On PostGIS and SpatiaLite, when the coordinates are geodetic (angular), you can specify if the calculation should be based on a simple sphere (less accurate, less resource-intensive) linear_units Returns the value of the linear units. angular_name Returns the name of the angular units.” angular_units Returns the value of the angular units. units Returns a 2-tuple of the units value0 码力 | 1878 页 | 6.40 MB | 1 年前3Django 1.10.x Documentation
the geometries (e.g. ST_Distance_Sphere on PostGIS). When distances are calculated with geodetic (angular) coordinates, as is the case with the default WGS84 (4326) SRID, you can set the spheroid keyword determine the unit of the field. On PostGIS and SpatiaLite, when the coordinates are geodetic (angular), you can specify if the calculation should be based on a simple sphere (less accurate, less resource-intensive) linear_units Returns the value of the linear units. angular_name Returns the name of the angular units.” angular_units Returns the value of the angular units. 6.5. contrib packages 863 Django Documentation0 码力 | 1817 页 | 6.19 MB | 1 年前3Django 1.11.x Documentation
the geometries (e.g. ST_DistanceSphere on PostGIS). When distances are calculated with geodetic (angular) coordinates, as is the case with the default WGS84 (4326) SRID, you can set the spheroid keyword its length as a Distance measure. On PostGIS and SpatiaLite, when the coordinates are geodetic (angular), you can specify if the calculation should be based on a simple sphere (less accurate, less resource-intensive) linear_units Returns the value of the linear units. angular_name Returns the name of the angular units.” angular_units Returns the value of the angular units. units Returns a 2-tuple of the units value0 码力 | 2747 页 | 2.67 MB | 1 年前3Django 1.10.x Documentation
the geometries (e.g. ST_Distance_Sphere on PostGIS). When distances are calculated with geodetic (angular) coordinates, as is the case with the default WGS84 (4326) SRID, you can set the spheroid keyword determine the unit of the field. On PostGIS and SpatiaLite, when the coordinates are geodetic (angular), you can specify if the calculation should be based on a simple sphere (less accurate, less resource- linear_units Returns the value of the linear units. angular_name Returns the name of the angular units.” angular_units Returns the value of the angular units. units Returns a 2-tuple of the units value0 码力 | 2538 页 | 2.59 MB | 1 年前3
共 216 条
- 1
- 2
- 3
- 4
- 5
- 6
- 22