per page, with , order by , clip by
Results of 1 - 4 of about 4 for myfile (0.004 sec.)
Porting your apps from Django 0.96 to 1.0 12205
Porting your apps from Django 0.96 to 1.0 Django 1.0 breaks compatibility with 0.96 in some areas. This guide will help you port 0.96 projects and apps to 1.0. The first part of this document includes the common changes needed to run with 1 ... of these model fields has changed. You will need to make the following changes, assuming your model's FileField is called myfile : Old (0.96) New (1.0) myfile.get_content_filename() myfile.content.path myfile.get_content_url() myfile.content.url myfil ... e.get_content_size() myfile.content.size myfile.save_content_file() myfile.content.save() myfile.get_content_width() myfile.content.width myfile.get_c ... ontent_height() myfile.content.height Note that the width and height attributes only make sense for ImageField fields. More details can be found ...
https://man.mtool.work/django/6.1/releases/1.0-porting-guide.html
ファイルの管理 9357
ファイルの管理 この文書では、ユーザがアップロードしたようなファイルに対する Django のファイルアクセス API について説明します。下位レベルの API は十分一般的なので、他の目的にも使えます。"静的ファイル" (JS や CSS など) を扱いたい場合は、 静的 ... django.core.files import File # Create a Python file object using open() >>> f = open ( "/path/to/hello.world" , "w" ) >>> myfile = File ( f ) これで、 File クラスのドキュメント化された属性とメソッドのすべてを使えるようになりました。 この方法で作成され ... Create a Python file object using open() and the with statement >>> with open ( "/path/to/hello.world" , "w" ) as f : ... myfile = File ( f ) ... myfile . write ( "Hello World" ) ... >>> myfile . closed True >>> f . closed True ファイルを閉じることは、 ...
https://man.mtool.work/django/6.1/topics/files.html
モデルフィールドリファレンス 7729
モデルフィールドリファレンス このドキュメントには、Django が提供するフィールドオプション field options とフィールド型 field types を含む、 Field のすべての API リファレンスが記載されています。 注釈 フィールドは django.db.models.fields に定義 ... m django.core.files import File # Open an existing file using Python's built-in open() f = open ( "/path/to/hello.world" ) myfile = File ( f ) もしくは、以下のように Python の文字列から構築することもできます: from django.core.files.base import ContentF ... ile myfile = ContentFile ( "hello world" ) より詳しくは ファイルの管理 を参照してください。 FieldFile. delete ( save = True ) [ソース ...
https://man.mtool.work/django/6.1/ref/models/fields.html
リクエストとレスポンスのオブジェクト 7637
リクエストとレスポンスのオブジェクト 簡単な概要 Django は、システムを通じてステータスを渡すために、リクエストとレスポンスのオブジェクトを使います。 あるページがリクエストされたとき、Django はリクエストに関するメタデータを含んだ HttpRequest ... るファイルライクオブジェクトを受け付けます。 >>> from django.http import FileResponse >>> response = FileResponse ( open ( "myfile.png" , "rb" )) ファイルは自動的に閉じられるため、コンテキストマネージャーで開かないでください。 ASGI における使用 Pythonの ...
https://man.mtool.work/django/6.1/ref/request-response.html
PREV 1 NEXT