Results of 11 - 20 of about 231 for import (0.044 sec.)
- GeoDjango Tutorial — Django 4.0.6 ドキュメント 7197
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
layer name and use the -so option to get only the important summary information: $ ogrinfo -so world/da ...
to represent this data: from django.contrib.gis.db import models class WorldBorder ( models . Model ): # Reg ...
return self . name Note that the models module is imported from django.contrib.gis.db . The default spatial ...
migrations: ... Applying world.0001_initial... OK Importing Spatial Data ¶ This section will show you how t ...
-
https://man.plustar.jp/django/ref/contrib/gis/tutorial.html
- [similar]
- クラスベースのビューでミックスインを使用する — Django 4.0.6 ドキュメント 7156
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
d views introduction . views.py ¶ from django.http import HttpResponseForbidden , HttpResponseRedirect from ...
django.urls import reverse from django.views import View from django. ...
views.generic.detail import SingleObjectMixin from books.models import Author ...
our URLs easily enough: urls.py ¶ from django.urls import path from books.views import RecordInterestView ur ...
-
https://man.plustar.jp/django/topics/class-based-views/mixins.html
- [similar]
- アプリケーション — Django 4.0.6 ドキュメント 7084
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
、 django.apps :: にあります。 >>> from django.apps import apps >>> apps . get_app_config ( 'admin' ) . verbo ...
なるでしょう: # rock_n_roll/apps.py from django.apps import AppConfig class RockNRollConfig ( AppConfig ): nam ...
e path to a configuration class. 注釈 If your code imports the application registry in an application's __in ...
t practice is to move that code to a submodule and import it. A workaround is to import the registry under a ...
-
https://man.plustar.jp/django/ref/applications.html
- [similar]
- Djangoの設定 — Django 4.0.6 ドキュメント 7053
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
) for i in range ( 30 )] 他の設定ファイルから値を import できます。 設定ファイルの指定 ¶ DJANGO_SETTINGS_MO ...
e that the settings module should be on the Python import search path . django-admin ユーティリティ ¶ django ...
必要があります。これには os.environ :: を使います。 import os os . environ [ 'DJANGO_SETTINGS_MODULE' ] = 'my ...
jangoアプリケーションからは django.conf.settings をimportすることで設定を参照できます。例: from django.conf i ...
-
https://man.plustar.jp/django/topics/settings.html
- [similar]
- ビルトインのクラスベースのジェネリックビュー — Django 4.0.6 ドキュメント 6940
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
うなモデルを使用します。 # models.py from django.db import models class Publisher ( models . Model ): name = ...
義しましょう。 # views.py from django.views.generic import ListView from books.models import Publisher class ...
URL にフックさせます。 # urls.py from django.urls import path from books.views import PublisherListView url ...
うになります。 # views.py from django.views.generic import ListView from books.models import Publisher class ...
-
https://man.plustar.jp/django/topics/class-based-views/generic-display.html
- [similar]
- ファイルの管理 — Django 4.0.6 ドキュメント 6909
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
ing an ImageField to store a photo: from django.db import models class Car ( models . Model ): name = models ...
you are using the default FileSystemStorage ): >>> import os >>> from django.conf import settings >>> initia ...
ing file on disk to a FileField : >>> from pathlib import Path >>> from django.core.files import File >>> pa ...
out reopening the image. For example: >>> from PIL import Image >>> car = Car . objects . get ( name = '57 C ...
-
https://man.plustar.jp/django/topics/files.html
- [similar]
- モデルからフォームを作成する — Django 4.0.6 ドキュメント 6868
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
クラスを用意してあります。 例: >>> from django.forms import ModelForm >>> from myapp.models import Article # C ...
うな一連のモデルを考えていきましょう: from django.db import models from django.forms import ModelForm TITLE_CH ...
) メソッドで、これからすぐ説明します): from django import forms class AuthorForm ( forms . Form ): name = fo ...
オーバーライドできます。 from django.core.exceptions import NON_FIELD_ERRORS from django.forms import ModelFor ...
-
https://man.plustar.jp/django/topics/forms/modelforms.html
- [similar]
- ファイルのアップロード — Django 4.0.6 ドキュメント 6868
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
rm containing a FileField : forms.py ¶ from django import forms class UploadFileForm ( forms . Form ): title ...
d look something like: views.py ¶ from django.http import HttpResponseRedirect from django.shortcuts import ...
render from .forms import UploadFileForm # Imaginary function to handle an u ...
ploaded file. from somewhere import handle_uploaded_file def upload_file ( request ): ...
-
https://man.plustar.jp/django/topics/http/file-uploads.html
- [similar]
- The "sites" framework — Django 4.0.6 ドキュメント 6837
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
he Article model: from django.contrib.sites.models import Site from django.db import models class Article ( ...
ing like this: from django.contrib.sites.shortcuts import get_current_site def article_detail ( request , ar ...
model like this: from django.contrib.sites.models import Site from django.db import models class Article ( ...
iew is being called. For example: from django.conf import settings def my_view ( request ): if settings . SI ...
-
https://man.plustar.jp/django/ref/contrib/sites.html
- [similar]
- クエリー式 — Django 4.0.6 ドキュメント 6837
- " + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va
...
even other expressions. 例 ¶ from django.db.models import Count , F , Value from django.db.models.functions ...
mport Length , Upper from django.db.models.lookups import GreaterThan # Find companies that have more employ ...
le underscore lookup syntax. from django.db.models import CharField from django.db.models.functions import L ...
be used directly in filters. from django.db.models import Exists Company . objects . filter ( Exists ( Emplo ...
-
https://man.plustar.jp/django/ref/models/expressions.html
- [similar]