Flask入门教程
movies|length }} Titles- {% for movie in movies %} {# 迭代 movies 变量 #}
- {{ movie.title }} - {{ movie.year }} {# 等同于 movie['title'] #} {% endfor %} {# 使用 endfor # ... @app.route('/') def index(): return render_template('index.html', name=name, movies=movie s) 为了更好的表示这个视图函数的作用,我们把原来的函数名 hello 改为 index ,意思是“索引”,即主页。 在传入 render_template() 函数的关键字参数中,左边的 电影列表 */ .movie-list { list-style-type: none; padding: 0; margin-bottom: 10px; box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rg ba(0, 0, 0, 0.12); } .movie-list li {
0 码力 | 127 页 | 7.62 MB | 1 年前3Mypy 1.8.0 Documentation
object: def new_user(user_class): user = user_class() # (Here we could write the user object to a database) return user How would we annotate this function? Without the ability to parameterize type, the represent objects with a fixed schema, such as {'id': 1, 'items': ['x']}. Here is a typical example: movie = {'name': 'Blade Runner', 'year': 1982} Only a fixed set of string keys is expected ('name' and keys are supported. This is clearly not a good fit for movie above. Instead, you can use a TypedDict to give a precise type for objects like movie, where the type of each dictionary value depends on the0 码力 | 234 页 | 902.89 KB | 1 年前3Mypy 1.10.0+dev Documentation
def new_user(user_class): user = user_class() # (Here we could write the user object to a database) return user How would we annotate this function? Without the ability to parameterize type represent objects with a fixed schema, such as {'id': 1, 'items': ['x']}. Here is a typical example: movie = {'name': 'Blade Runner', 'year': 1982} Only a fixed set of string keys is expected ('name' and keys are supported. This is clearly not a good fit for movie above. Instead, you can use a TypedDict to give a precise type for objects like movie, where the type of each dictionary value depends on the0 码力 | 318 页 | 270.84 KB | 1 年前3Mypy 1.8.0 Documentation
def new_user(user_class): user = user_class() # (Here we could write the user object to a database) return user How would we annotate this function? Without the ability to parameterize type represent objects with a fixed schema, such as {'id': 1, 'items': ['x']}. Here is a typical example: movie = {'name': 'Blade Runner', 'year': 1982} Only a fixed set of string keys is expected ('name' and keys are supported. This is clearly not a good fit for movie above. Instead, you can use a TypedDict to give a precise type for objects like movie, where the type of each dictionary value depends on the0 码力 | 318 页 | 271.55 KB | 1 年前3Mypy 1.10.0+dev Documentation
object: def new_user(user_class): user = user_class() # (Here we could write the user object to a database) return user How would we annotate this function? Without the ability to parameterize type, the represent objects with a fixed schema, such as {'id': 1, 'items': ['x']}. Here is a typical example: movie = {'name': 'Blade Runner', 'year': 1982} Only a fixed set of string keys is expected ('name' and keys are supported. This is clearly not a good fit for movie above. Instead, you can use a TypedDict to give a precise type for objects like movie, where the type of each dictionary value depends on the0 码力 | 234 页 | 913.89 KB | 1 年前3CakePHP Cookbook 2.x
Contents Getting Started Blog Tutorial Getting CakePHP Creating the Blog Database CakePHP Database Configuration Optional Configuration A Note on mod_rewrite Blog Tutorial - Adding a layer Create management and migrations I18N shell ACL Shell Test shell Upgrade shell Development Configuration Database Configuration Additional Class Paths Core Configuration Configure Class Reading and writing configuration Using the Debugger Class Using Logging to debug Debug Kit Xdebug Testing Installing PHPUnit Test Database Setup Checking the Test Setup Test Case Conventions Creating Your First Test Case Running Tests0 码力 | 1096 页 | 958.62 KB | 1 年前3CakePHP Cookbook 2.x
your application. The framework also provides a basic organizational structure, from filenames to database table names, keeping your entire application consistent and logical. This concept is simple but of a simple blog application. We’ll be getting and installing CakePHP, creating and configuring a database, and creating enough application logic to list, add, edit, and delete blog posts. Here’s what you’ll have PHP 5.2.8 or greater. 2. A database server. We’re going to be using MySQL server in this tutorial. You’ll need to know enough about SQL in order to create a database: CakePHP will be taking the reins0 码力 | 820 页 | 2.52 MB | 1 年前3Flask Documentation (1.1.x)
Extensions Deploying to a Web Server Tutorial Project Layout Application Setup Define and Access the Database Blueprints and Views Templates Static Files Blog Blueprint Make the Project Installable Test Coverage aims to keep the core simple but extensible. Flask won’t make many decisions for you, such as what database to use. Those decisions that it does make, such as what templating engine to use, are easy to change that Flask can be everything you need and nothing you don’t. By default, Flask does not include a database abstraction layer, form validation or anything else where different libraries already exist that0 码力 | 428 页 | 895.98 KB | 1 年前3Flask Documentation (1.1.x)
aims to keep the core simple but extensible. Flask won’t make many decisions for you, such as what database to use. Those decisions that it does make, such as what templating engine to use, are easy to change that Flask can be everything you need and nothing you don’t. By default, Flask does not include a database abstraction layer, form validation or anything else where different libraries already exist that functionality to your appli- cation as if it was implemented in Flask itself. Numerous extensions provide database integration, form validation, upload handling, various open authentication technologies, and more0 码力 | 291 页 | 1.25 MB | 1 年前3PyMuPDF 1.12.2 documentation
Flags Annotation Types Annotation Flags Annotation Line End Styles Color Database Function getColor() Printing the Color Database Appendix 1: Performance Part 1: Parsing Part 2: Text Extraction Part Quote from the Adobe PDF Reference 1.7: “An annotation associates an object such as a note, sound, or movie with a location on a page of a PDF document, or provides a way to interact with the user by means width, height = fitz.PaperSize("A4-L"). 6. To simplify color specification, we provide a Color Database. This allows you to specify color = getColor("turquoise"), without bothering about any more details0 码力 | 387 页 | 2.70 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100