Results of 11 - 20 of about 53 for obj (0.061 sec.)
- Django の認証方法のカスタマイズ — Django 4.0.6 ドキュメント 8007
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
リアする必要があります。単純な手段としては、 Session.objects.all().delete() を実行することが挙げられます。 ...
れを通過するため). Django の admin は Django の User object と強く結合しています。これを扱う最も良い方法は ...
if login_valid and pwd_valid : try : user = User . objects . get ( username = username ) except User . Do ...
f get_user ( self , user_id ): try : return User . objects . get ( pk = user_id ) except User . DoesNotEx ...
-
https://man.plustar.jp/django/topics/auth/customizing.html
- [similar]
- django.utils.encoding — Django 4.0.6 ドキュメント 7963
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
rror ( UnicodeDecodeError ): def __init__ ( self , obj , * args ): self . obj = obj super () . __init__ ( ...
ed in %r ( %s )" % ( super () . __str__ (), self . obj , type ( self . obj ), ) [ドキュメント] def smart_ ...
only is True, don't convert (some) non-string-like objects. """ if isinstance ( s , Promise ): # The inpu ...
. time , ) [ドキュメント] def is_protected_type ( obj ): """Determine if the object instance is of a pro ...
-
https://man.plustar.jp/django/_modules/django/utils/encoding.html
- [similar]
- Django のショートカット関数 — Django 4.0.6 ドキュメント 7858
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
ven context dictionary and returns an HttpResponse object with that rendered text. Django does not provid ...
ender() . Required arguments ¶ request The request object used to generate this response. template_name T ...
ct() function in a number of ways. By passing some object; that object's get_absolute_url() method will b ...
tcuts import redirect def my_view ( request ): ... obj = MyModel . objects . get ( ... ) return redirect ...
-
https://man.plustar.jp/django/topics/http/shortcuts.html
- [similar]
- モデルインスタンスリファレンス — Django 4.0.6 ドキュメント 7412
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
): title = models . CharField ( max_length = 100 ) objects = BookManager () book = Book . objects . creat ...
る事でその値をデータベースから再読み込みします: >>> obj = MyModel . objects . first () >>> del obj . field ...
>>> obj . field # Loads the field from the database Model. ...
書くことができます: def test_update_result ( self ): obj = MyModel . objects . create ( val = 1 ) MyModel . ...
-
https://man.plustar.jp/django/ref/models/instances.html
- [similar]
- QuerySet API リファレンス — Django 4.0.6 ドキュメント 7412
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
ッドラインを出力するプログラムです: for e in Entry . objects . all (): print ( e . headline ) メモ: 単に1つ ...
を矯正します。たとえば: entry_list = list ( Entry . objects . all ()) bool(). Testing a QuerySet in a bool ...
s True , otherwise False . For example: if Entry . objects . filter ( headline = "Test" ): print ( "There ...
least one result exists (and don't need the actual objects), it's more efficient to use exists() . Pickli ...
-
https://man.plustar.jp/django/ref/models/querysets.html
- [similar]
- クラスベースのビューでミックスインを使用する — Django 4.0.6 ドキュメント 7278
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
on the class-based view; two other mixins ( SingleObjectTemplateResponseMixin and MultipleObjectTemplate ...
de more flexible defaults when dealing with actual objects. ContextMixin Every built in view which needs ...
r DetailView , which renders a "detail" view of an object, and ListView , which will render a list of obj ...
tionality when working with either a single Django object, or multiple objects. There are also mixins inv ...
-
https://man.plustar.jp/django/topics/class-based-views/mixins.html
- [similar]
- Django 2.1 リリースノート — Django 4.0.6 ドキュメント 7189
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
low users who have the "change" permission to edit objects. There are a couple of backwards incompatible ...
izing the deletion process of the "delete selected objects" action. You can now override the default admi ...
a query expression. The new ModelAdmin.get_deleted_objects() method allows customizing the deletion proce ...
n globally). The admin change list and change form object tools can now be overridden per app, per model, ...
-
https://man.plustar.jp/django/releases/2.1.html
- [similar]
- 複数のデータベース — Django 4.0.6 ドキュメント 7144
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
ng scheme. The default routing scheme ensures that objects remain 'sticky' to their original database (i. ...
e., an object retrieved from the foo database will be saved o ...
tabase that should be used for read operations for objects of type model . If a database operation is abl ...
est the database that should be used for writes of objects of type Model. If a database operation is able ...
-
https://man.plustar.jp/django/topics/db/multi-db.html
- [similar]
- データベースのトランザクション — Django 4.0.6 ドキュメント 7144
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
an active field, this snippet ensures that the if obj.active check at the end uses the correct value if ...
from django.db import DatabaseError , transaction obj = MyModel ( active = False ) obj . active = True t ...
ry : with transaction . atomic (): obj . save () except DatabaseError : obj . active = Fa ...
lse if obj . active : ... In order to guarantee atomicity, at ...
-
https://man.plustar.jp/django/topics/db/transactions.html
- [similar]
- django.contrib.gis.measure — Django 4.0.6 ドキュメント 7099
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
OSSIBILITY OF SUCH DAMAGE. # """ Distance and Area objects to allow for sensible and convenient calculati ...
, Decimal ) AREA_PREFIX = "sq_" def pretty_name ( obj ): return obj . __name__ if obj . __class__ == typ ...
e else obj . __class__ . __name__ @total_ordering class Measu ...
-
https://man.plustar.jp/django/_modules/django/contrib/gis/measure.html
- [similar]