-
這個裝飾器將否定給定視圖的
ATOMIC_REQUESTS
from django.db import transaction @transaction.non_atomic_requests def my_view(request): do_stuff() @transaction.non_atomic_requests(using='other') def my_other_view(request): do_stuff_on_the_other_database()
它僅在應用於視圖本身時才有效。
本文介紹 django.db.transaction.non_atomic_requests
的用法。
聲明
non_atomic_requests(using=None)[source]
相關用法
- Python Wand noise()用法及代碼示例
- Python now()用法及代碼示例
- Python numpy string not_equal()用法及代碼示例
- Python numpy.less()用法及代碼示例
- Python networkx.algorithms.shortest_paths.weighted.all_pairs_dijkstra_path用法及代碼示例
- Python numpy.polynomial.hermite.hermmul用法及代碼示例
- Python numpy.seterrobj用法及代碼示例
- Python networkx.classes.function.edge_subgraph用法及代碼示例
- Python numpy.tril()用法及代碼示例
- Python numpy.around用法及代碼示例
- Python networkx.algorithms.tree.mst.maximum_spanning_edges用法及代碼示例
- Python numpy.random.standard_normal()用法及代碼示例
- Python networkx.algorithms.bipartite.basic.color用法及代碼示例
- Python numpy.select用法及代碼示例
- Python networkx.algorithms.bipartite.cluster.latapy_clustering用法及代碼示例
- Python networkx.readwrite.json_graph.adjacency_data用法及代碼示例
- Python numpy.fft.irfft2用法及代碼示例
- Python numpy.polynomial.hermite_e.hermemul用法及代碼示例
- Python numpy.fft.irfftn用法及代碼示例
- Python numpy.nonzero()用法及代碼示例
- Python numpy.maximum_sctype()用法及代碼示例
- Python numpy.ma.dstack用法及代碼示例
- Python numpy.ma.make_mask_none()用法及代碼示例
- Python numpy.mod用法及代碼示例
- Python numpy.matrix.flatten用法及代碼示例
注:本文由純淨天空篩選整理自djangoproject.com大神的英文原創作品 django.db.transaction.non_atomic_requests。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。