- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 814 for users6 (0.08 sec)
-
tests/migrate_test.go
t.Fatalf("no view should be created, got %v", err) } query := DB.Model(&User{}). Select("users.id as users_id, users.name as users_name, pets.id as pets_id, pets.name as pets_name"). Joins("inner join pets on pets.user_id = users.id") if err := DB.Migrator().CreateView("users_pets", gorm.ViewOption{Query: query}); err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K bytes - Viewed (0) -
docs/en/docs/tutorial/security/first-steps.md
But in this case, the same **FastAPI** application will handle the API and the authentication. So, let's review it from that simplified point of view: * The user types the `username` and `password` in the frontend, and hits `Enter`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.2K bytes - Viewed (0) -
tests/associations_many2many_test.go
func TestMany2ManyAssociation(t *testing.T) { user := *GetUser("many2many", Config{Languages: 2}) if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } CheckUser(t, user, user) // Find var user2 User DB.Find(&user2, "id = ?", user.ID) DB.Model(&user2).Association("Languages").Find(&user2.Languages) CheckUser(t, user2, user) // Count
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Jun 10 13:05:19 UTC 2023 - 13.2K bytes - Viewed (0) -
tests/distinct_test.go
) func TestDistinct(t *testing.T) { users := []User{ *GetUser("distinct", Config{}), *GetUser("distinct", Config{}), *GetUser("distinct", Config{}), *GetUser("distinct-2", Config{}), *GetUser("distinct-3", Config{}), } users[0].Age = 20 if err := DB.Create(&users).Error; err != nil { t.Fatalf("errors happened when create users: %v", err) } var names []string
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 2.5K bytes - Viewed (0) -
tests/test_infer_param_optionality.py
app.include_router(user_router, prefix="/users") app.include_router(item_router, prefix="/items") app.include_router(item_router, prefix="/users/{user_id}/items") client = TestClient(app) def test_get_users(): """Check that /users returns expected data""" response = client.get("/users") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 13.3K bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/main.py
@app.post("/users/", response_model=schemas.User, dependencies=[Depends(get_db)]) def create_user(user: schemas.UserCreate): db_user = crud.get_user_by_email(email=user.email) if db_user: raise HTTPException(status_code=400, detail="Email already registered") return crud.create_user(user=user) @app.get("/users/", response_model=List[schemas.User], dependencies=[Depends(get_db)])
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 2.2K bytes - Viewed (0) -
clause/from_test.go
}, }, }, }, }, "SELECT * FROM `users` INNER JOIN `articles` ON `articles`.`id` = `users`.`id`", nil, }, { []clause.Interface{ clause.Select{}, clause.From{ Tables: []clause.Table{{Name: "users"}}, Joins: []clause.Join{ { Type: clause.RightJoin, Table: clause.Table{Name: "profiles"},
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jul 15 02:25:10 UTC 2020 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_testing_dependencies/test_tutorial001.py
def test_override_in_users(): response = client.get("/users/") assert response.status_code == 200, response.text assert response.json() == { "message": "Hello Users!", "params": {"q": None, "skip": 5, "limit": 10}, } def test_override_in_users_with_q(): response = client.get("/users/?q=foo") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 10 09:08:19 UTC 2020 - 1.5K bytes - Viewed (0) -
tests/test_tutorial/test_testing_dependencies/test_tutorial001_an.py
def test_override_in_users(): response = client.get("/users/") assert response.status_code == 200, response.text assert response.json() == { "message": "Hello Users!", "params": {"q": None, "skip": 5, "limit": 10}, } def test_override_in_users_with_q(): response = client.get("/users/?q=foo") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.5K bytes - Viewed (0) -
docs/zh/docs/tutorial/security/get-current-user.md
## 获取用户 `get_current_user` 使用创建的(伪)工具函数,该函数接收 `str` 类型的令牌,并返回 Pydantic 的 `User` 模型: ```Python hl_lines="19-22 26-27" {!../../docs_src/security/tutorial002.py!} ``` ## 注入当前用户 在*路径操作* 的 `Depends` 中使用 `get_current_user`: ```Python hl_lines="31" {!../../docs_src/security/tutorial002.py!} ``` 注意,此处把 `current_user` 的类型声明为 Pydantic 的 `User` 模型。 这有助于在函数内部使用代码补全和类型检查。 /// tip | "提示"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.5K bytes - Viewed (0)