... taurant ( models . Model ): place = models . OneToOneField ( Place , on_delete = models . CASCADE , primary_key = True , ) serves_hot_dogs = models . BooleanField ( default = False ) serves_pizza = models . BooleanField ( default = False ) def __str__ ... ave () レストランを作成する。オブジェクトの主キーとして "parent" オブジェクトを渡します: >>> r = Restaurant ( place = p1 , serves_hot_dogs = True , serves_pizza = False ) >>> r . save () Restaurant は自身の place にアクセスできます: >>> r . place <Plac ... ます: >>> p3 = Place ( name = "Demon Dogs" , address = "944 W. Fullerton" ) >>> Restaurant . objects . create ( place = p3 , serves_hot_dogs = True , serves_pizza = False ) Traceback (most recent call last): ... ValueError : save() prohibited to prevent ... ... taurant ( models . Model ): place = models . OneToOneField ( Place , on_delete = models . CASCADE , primary_key = True , ) serves_hot_dogs = models . BooleanField ( default = False ) serves_pizza = models . BooleanField ( default = False ) def __str__ ... ave () レストランを作成する。オブジェクトの主キーとして "parent" オブジェクトを渡します: >>> r = Restaurant ( place = p1 , serves_hot_dogs = True , serves_pizza = False ) >>> r . save () Restaurant は自身の place にアクセスできます: >>> r . place <Plac ... ます: >>> p3 = Place ( name = "Demon Dogs" , address = "944 W. Fullerton" ) >>> Restaurant . objects . create ( place = p3 , serves_hot_dogs = True , serves_pizza = False ) Traceback (most recent call last): ... ValueError : save() prohibited to prevent ... ... onses. As part of the 1.4.18 security release, the django.views.static.serve() function was altered to stream the files it serves. Unfortunately, the GZipMiddleware consumed the stream prematurely and prevented files from being served properly ( #24158 ... tream files リリースノート January fixes regression バグ 修正 supports streaming responses part views static serve altered serves Unfortunately consumed prematurely prevented served クイック検索 Last update: 2026年10月09日 « previous | up | next » ... ... onses. As part of the 1.4.18 security release, the django.views.static.serve() function was altered to stream the files it serves. Unfortunately, the GZipMiddleware consumed the stream prematurely and prevented files from being served properly ( #24158 ... ... えてみてください。 class Place ( models . Model ): name = models . CharField ( max_length = 50 ) class Restaurant ( Place ): serves_hot_dogs = models . BooleanField ( default = False ) もし次のように Reastaurant モデルだけをシリアライズした場合、 data = ... serializers . serialize ( "json" , Restaurant . objects . all ()) シリアライズされた出力のフィールドには、 serves_hot_dogs 属性だけが含まれます。ベースクラスの name 属性は無視されます。 Restaurant インスタンスを完全にシリアライズするため ... ... えてみてください。 class Place ( models . Model ): name = models . CharField ( max_length = 50 ) class Restaurant ( Place ): serves_hot_dogs = models . BooleanField ( default = False ) もし次のように Reastaurant モデルだけをシリアライズした場合、 data = ... serializers . serialize ( "json" , Restaurant . objects . all ()) シリアライズされた出力のフィールドには、 serves_hot_dogs 属性だけが含まれます。ベースクラスの name 属性は無視されます。 Restaurant インスタンスを完全にシリアライズするため ... ... name = models . CharField ( max_length = 50 ) address = models . CharField ( max_length = 80 ) class Restaurant ( Place ): serves_hot_dogs = models . BooleanField ( default = False ) serves_pizza = models . BooleanField ( default = False ) データはデー ... ... name = models . CharField ( max_length = 50 ) address = models . CharField ( max_length = 80 ) class Restaurant ( Place ): serves_hot_dogs = models . BooleanField ( default = False ) serves_pizza = models . BooleanField ( default = False ) データはデー ... ... path for ADMIN_MEDIA_PREFIX (e.g. /media/ ) simply make sure STATIC_URL and STATIC_ROOT are configured and your web server serves those files correctly. The development server continues to serve the admin files just like before. Read the static files h ... d for potential thread-sharing (by passing the check_same_thread=False attribute to pysqlite ). DatabaseWrapper however preserves the previous behavior by disabling thread-sharing by default, so this does not affect any existing code that purely relies ... ... ews urlpatterns = patterns ( "" , url ( "^$" , views . myview ), url ( "^other/$" , views . otherview ), ) Thus patterns() serves little purpose and is a burden when teaching new users (answering the newbie's question "why do I need this empty string a ... 2026年10月08日