per page, with , order by , clip by
Results of 1 - 9 of about 9 for vote (0.004 sec.)
はじめての Django アプリ作成、その 4 13247
はじめての Django アプリ作成、その 4 このチュートリアルは チュートリアルその 3 の続きです。ここでは、引き続きWeb投票アプリケーションの開発を例にして、簡単なフォー ム処理とコードの縮小化を中心に解説します。 困ったときは: このチュートリアルの ... l.html") を更新して、HTML の <form> 要素を入れましょう。 polls/templates/polls/detail.html < form action = " {% url 'polls:vote' question.id %} " method = "post" > {% csrf_token %} < fieldset > < legend >< h1 > {{ question.question_text }} </ h1 ></ ... loop .counter }} " > {{ choice.choice_text }} </ label >< br > {% endfor %} </ fieldset > < input type = "submit" value = "Vote" > </ form > 簡単に説明: 上のテンプレートは、各質問の選択肢のラジオボタンを表示するものです。各ラジオボタンの value は、関 ... hoice=# (#は選んだ選択肢のID)が送信されます。これは、HTMLフォームの基本的な概念です。 フォームの action を {% url 'polls:vote' question.id %} に設定し、 method="post" を指定しています。 ( method="get" ではなく) method="post" を使用することは非常に重 ...
https://man.mtool.work/django/6.1/intro/tutorial04.html
はじめての Django アプリ作成、その 3 11108
はじめての Django アプリ作成、その 3 このチュートリアルは チュートリアルその 2 の続きです。ここでは、引続き Web 投票アプリケーションの開発を例にして、公開用のインタフェース、ビュー(view) の作成を焦点に解説します。 困ったときは: このチュート ... stion_id ): response = "You're looking at the results of question %s ." return HttpResponse ( response % question_id ) def vote ( request , question_id ): return HttpResponse ( "You're voting on question %s ." % question_id ) 次の path() コールを追加 ... ail" ), # ex: /polls/5/results/ path ( "<int:question_id>/results/" , views . results , name = "results" ), # ex: /polls/5/vote/ path ( "<int:question_id>/vote/" , views . vote , name = "vote" ), ] ブラウザで "/polls/34/" を見てください。 detail() 関 ... 数が実行され、URLで指定したIDが表示されます。 "/polls/34/results/" と "/polls/34/vote/" も試してみてください--これらはプレースホルダの結果と投票ページを表示します。 誰かがWebサイトの 「/polls/34/」 をリクエス ...
https://man.mtool.work/django/6.1/intro/tutorial03.html
Djangoの認証システムを使用する 8376
Djangoの認証システムを使用する このドキュメントでは、デフォルト設定でのDjangoの認証システムの使用方法を説明します。この設定は、タスクの適切な範囲を管理することで、最も一般的なプロジェクトのニーズにかなうよう徐々に発展してきました。そして、パ ... の属性ルックアップを真偽値として評価することは User.has_perm() の代替となります。たとえば、ログインしているユーザが foo.add_vote というパーミッションを持っているかどうかを調べるには、次のようにします: {% if perms.foo.add_vote %} 以下は、テンプレートで ... 、より完全な例です: {% if perms.foo %} < p > You have permission to do something in the foo app. </ p > {% if perms.foo.add_vote %} < p > You can vote! </ p > {% endif %} {% if perms.foo.add_driving %} < p > You can drive! </ p > {% endif %} {% else % ... in %} ステートメントを使ってパーミッションをルックアップすることも可能です。例えば: {% if 'foo' in perms %} {% if 'foo.add_vote' in perms %} < p > In lookup works, too. </ p > {% endif %} {% endif %} admin 内でユーザを管理する django.contrib.admin と ...
https://man.mtool.work/django/6.1/topics/auth/default.html
Django プロジェクトの組織 8268
Django プロジェクトの組織 原則 Django プロジェクトは、3 つの目標を追求するボランティアチームによって管理されています。 Django ウェブフレームワークの開発を推進すること、 Django 関連ソフトウェアのエコシステムを育成すること、 Django コミュニテ ... of candidates to the Django Forum , and the election begins. The DSF Board provides a voting form accessible to registered voters, and is the custodian of the votes. 投票は、候補者名簿と候補者に関する関連資料を無作為に並べた無記名投票によって行われま ... 記載された候補者5名まで投票することができます。 The election conclude one week after it begins. The DSF Board then tally the votes and produce a summary, including the total number of votes cast and the number received by each candidate. This summary i ... s ratified by a majority vote of the DSF Board, then posted by the Secretary of the DSF to the Django Forum . The five candidates with the highest vote ...
https://man.mtool.work/django/6.1/internals/organization.html
クラスベースビュー入門 8268
クラスベースビュー入門 クラスベースビューはビューを実装するもう一つの手段で、関数の代わりに Python のオブジェクトとしてビューを定義します。クラスベースビューは関数ベースのビューを完全に置き換えるものではありませんが、関数ベースのビューと比較 ... th.decorators import login_required , permission_required from django.views.generic import TemplateView from .views import VoteView urlpatterns = [ path ( "about/" , login_required ( TemplateView . as_view ( template_name = "secret.html" ))), path ( ... "vote/" , permission_required ( "polls.can_vote" )( VoteView . as_view ())), ] このアプローチではデコレータはインスタンスごとに適 ...
https://man.mtool.work/django/6.1/topics/class-based-views/intro.html
django.contrib.auth 8070
django.contrib.auth このドキュメントでは、Django の 認証システムのコンポーネントの API リファレンス資料を提供しています。 これらのコンポーネントの使い方や、認証と認可をカスタマイズする方法の詳細は、 認証トピックガイド を参照してください。 U ... Permission オブジェクトには以下のフィールドがあります: class models. Permission name 必須です。255 文字以下です。例: 'Can vote' 。 content_type 必須です。 ContentType モデルを参照する外部キーです。 codename 必須です。100 文字以下です。例: 'can_vote' ...
https://man.mtool.work/django/6.1/ref/contrib/auth.html
コードのコミット 7855
コードのコミット This section is addressed to the mergers and to anyone interested in knowing how code gets committed into Django. The コミットガイドライン apply to all contributors, with or without commit rights. If you're a community memb ... e reverter-to-be then try to work it out on the Django Forum . If an agreement can't be reached then it should be put to a vote. もしそのコミットが、確認され、公開されたセキュリティ脆弱性を含んでいた場合、そのコミットは誰の許可も得ずに即座に差し戻され ...
https://man.mtool.work/django/6.1/internals/contributing/committing-code.html
チケットをトリアージする 7855
チケットをトリアージする Django uses Trac for managing the work on the code base. Trac is a community-tended garden of the bugs people have found and the features Django has decided to add. As in any garden, sometimes there are weeds to be ... all of them, but anyone in the Django community can participate in any role except merger. The merger role is granted by a vote of the Steering Council . Triagers: anyone can take on this role by checking whether a ticket describes a real issue and k ...
https://man.mtool.work/django/6.1/internals/contributing/triaging-tickets.html
はじめての Django アプリ作成、その 2 7765
はじめての Django アプリ作成、その 2 このチュートリアルは チュートリアルその 1 の続きです。ここでは、データベースをセットアップして、最初のモデルを作成し、そして Django が自動的に生成してくれる管理サイトについて、簡単なイントロダクションをし ... は、 Question と Choice の2つのモデルを作成します。 Question には質問文と公開日時があります。 Choice には選択肢のテキストと vote という2つのフィールドがあります。各 Choice は1つの Question に関連づけられています。 Django では、こうした概念を簡単な Pyt ... on = models . ForeignKey ( Question , on_delete = models . CASCADE ) choice_text = models . CharField ( max_length = 200 ) votes = models . IntegerField ( default = 0 ) コードは単純明解ですね。各モデルは一つのクラスで表現され、いずれも django.db.mode ... ーススキーマで使われる他、後で述べるバリデーションでも使われます。 Field はいくつかオプションの引数も取れます。今回の場合、 votes の default 値を 0 に設定しました。 最後に、 ForeignKey を使用してリレーションシップが定義されていることに注目してください ...
https://man.mtool.work/django/6.1/intro/tutorial02.html
PREV 1 NEXT