This article mainly introduces the method of database migration of Laravel, small series think very good, now share to everyone, also give you a reference. Follow the small series together to see it, hope to help everyone.
Build migration
The--table and--create options can be used to specify the name of the data table or a new data table that will be created when the migration is executed. These options are required to fill in the specified data table when the migration file is pre-generated:
How to configure multiple subdomains In the Python Flask framework, pythonflask
Flask subdomain nameIt is generally used for a small number of subdomain names. A module corresponds to a subdomain name. Let's take a look at the following example:
Modules. py:
from flask import Blueprintpublic = Blueprint('public', __name__)@public.route('/')def home(): return 'hello flask'app.py:app = Flask(__name__)app.config['SERVER_NAME'] = 'example.com'from module
Overview
To develop a large project with flask, you must have a good project file structure, which records the configuration of the Flask minimum development project. The Python version used here is 3.5.1,flask version 0.11.1. test Environment Python version: 3.5.1 flask version: 0.11.1 pycharm version: 5.0.3 main directory
The main catalogue is as follows:folder Description app
App for the folder where the application is placed, the main auth and Models,auth are placed flask the
Current_app.config can see all the current app's configuration filesFrom flask Import Flask,current_app@app. Route ('/index ', methods=["GET", "POST"]) def index (): print (current_app.config) #当前的app的所有配置 session["XX"] = "fdvbn" Return "index"Second, blueprint (flask in the multi-py file is used to split the blueprint)If the code is very numerous, you want to categorize it. Different functions
.from sanic.response Import Text3.from sanic.exceptions Import notfoundbr/>[email protected](NotFound)
?? return text ("Yep, I totally found the page: {}". Format (Request.url))BlueprintLike the blueprints in flask, to organize the project structure?Create a blueprint that is equivalent to creating a Sanic app with the same usage as above and changing the app to a blueprint name BP1.from sanic.response Im
1. BlueprintTo manage a project with a blueprint, the package that needs to be imported is: from flask import BuleprintThe concrete is broadly divided into three steps:1. First import the Blueprint package in the Submodule and then create the Blueprint object.2. The view functions in the submodule are then stored in the Bluep
function DeclarationThere are two kinds of functions in UE4, one is the traditional C + + function, the other is ufunction. Ufunction supports some special functions by adding some descriptors
Ufunction ([specifier, specifier, ...], [Meta (Key=value, Key=value, ...)])
ReturnType functionname ([Parameter, Parameter, ...])
There are several applications: Call in Blueprint as delegate, such as binding the network callback with the keystroke message and d
, Ublueprintgeneratedclass, Ufunction, Uenum, and Uproperty, as well as the subclasses that inherit from them. Each inherited uobject and supports a reflection system type has a corresponding uclass, or its subclasses (such as the blueprint corresponding to the curriculum Ublueprintgeneratedclass class, it inherits from Uclass), if it is a specific blueprint type, such as the Action
Chapter I. Introduction to UML1. Defining a unified Model language (Unified modeing language,uml) represents the graphical representation of the same family, and there is a common Hyper model (meta model) behind these representations. They can help us describe and design software systems, especially those designed with object-oriented styles.The underlying reason behind the model: programming languages cannot be sufficiently abstract to allow us to discuss design-related issues.UML is a fairly o
Python framework BASICS (4) -------- other operations, pythonflask1. Blueprint
To use a blueprint to manage a project, the package to be imported is: from flask import Buleprint
There are roughly three steps:
1. First import the blueprint package into the sub-module, and then create the blueprint object.
2. Store t
to display data on a map, it is possible to clearly see patterns or trends that are difficult to find in data records and provide a basis for user decisions. Thematic maps include six forms of range value, point density, histogram, rank symbol, pie chart, and independent value.
(5), built-in ODBC
MapInfo built-in ODBC, support a variety of relational databases, support SQL queries, thus ensuring the use of the original database and access to remote databases. With the function of spatial quer
In the first three articles, the design details and application scope of the grid system are clarified. This article will focus on the technical implementation of the 960 grid system.
The realization of Blueprint
Blueprint is a complete CSS framework, a grid system is part of its function. Let's look at the demo page:
The above three column layout code is:
The above is the basic function,
SCSI, not IDE)
?? Do really thoughtful, originally those who are not SCSI/IDE optical drive who is still using AH, choose it, anyway, I am using the IDE CD-ROM, do not choose this.
20. Character devices
?? Character device. This content is too much. use the default settings first, and modify the content as needed. Let's introduce the main categories:
?? I2C support: I2C is a low-speed serial bus protocol used in micro-control applications promoted by Philips. This option is required if you want
support
If you don't understand it, you should configure amateur wireless broadcasting. No, no.
8.17. IrDA (infrared) support
This requires infrared support.
8.18. ISDN subsystem
If you use ISDN to access the Internet, this is essential. I have done it myself.
8.19. Old CD-ROM drivers (not SCSI, not IDE)
I did really thoughtful, who is still using the non-SCSI/IDE optical drive, I choose it, anyway, I am using the IDE CD-ROM,
This is not selected.
8.20. Character devices
Character device.
you use ISDN to access the internet, this is essential. 19. old CD-ROM drivers (not SCSI, not IDE) do really thoughtful, the original those non SCSI/IDE ports who are still using the drive AH, choose it, do not select a CD-ROM with IDE. 20. Character devices Character device. This content is too much. use the default settings first, and modify the content as needed. Let's take a look at the major categories: I2C support: I2C is the low-speed serial bus protocol used by Philips in micro-control
Wireless broadcast.
17. IrDA (infrared) Support
Infrared support.
18. ISDN Subsystem
If you use ISDN to access the Internet, this is essential.
19. Old CD-ROM drivers (not SCSI, not IDE)
Do really thoughtful, originally those who are not SCSI/ide optical drive who is still using ah, choose it yourself, with IDE CD-ROM don't have to choose.
20. Character Devices
Character device. This content is too much. Use the default settings first, and modify the content as needed. Let's introduce the main
mouse.
* Inport mice
Inport mice contains most old Microsoft mouse types. Inport mice is usually connected to the interface card of the motherboard. If the mouse wire connector is round and has 9 needles, it may be Inport mice.
* Logitech mice
* PS/2 mice
* ATI combo video/mice
* IBM PC110 palmtop digitizer
* Apple Desktop Mouse
* Hybrid Mice
For the mouse protocol, most bus mice use the BusMouse protocol. Some ancient Logitech mice use the MouseSyst
How to disable the Asus S550C touch screen in Ubuntu
I accidentally made a crack on the Asus S550C touch screen, which caused the screen to automatically click, seriously affecting the use. In Windows, the touch screen can be directly disabled through the FN + F7 shortcut, but after the Ubuntu system is changed, the shortcut key is no longer needed. After a while, I finally found a way to disable the touch screen through xinput. The specific steps are as follows:
1. Enter xinput on the termina
Asus S550C Touch Screen I accidentally made a crack, causing the screen will always be inexplicably automatic click, seriously affected the use. The touch screen can be disabled directly under Windows System via Fn+f7 shortcut keys, but after the Ubuntu system, the shortcut keys are not used. Groping for a while, finally found the way to disable the touchscreen through XInput, the following steps:1. Terminal input XInput, find the name of the touch screen in the list of input devices Atmel Atmel
Flask actively throws exceptions and provides a unified sample code for exception handling.
This article mainly introduces flask's active exception throws and unified exception handling. The details are as follows.
When an exception occurs in the background during development, but you do not want to display the exception to the user or want to handle the exception in a unified manner, you can use abort to throw an exception and capture the page after the exception is returned.
Actively throw an
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.