Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
a7797577
Kaydet (Commit)
a7797577
authored
Mar 25, 2014
tarafından
Tim Martin
Kaydeden (comit)
Tim Graham
Mar 27, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #21941 -- Documented the kwargs param of django.conf.urls.url().
Thanks cjerdonek for the report.
üst
c19bbefc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
urls.txt
docs/ref/urls.txt
+3
-0
urls.txt
docs/topics/http/urls.txt
+11
-5
No files found.
docs/ref/urls.txt
Dosyayı görüntüle @
a7797577
...
@@ -76,6 +76,9 @@ This function takes five arguments, most of which are optional::
...
@@ -76,6 +76,9 @@ This function takes five arguments, most of which are optional::
url(regex, view, kwargs=None, name=None, prefix='')
url(regex, view, kwargs=None, name=None, prefix='')
The ``kwargs`` parameter allows you to pass additional arguments to the view
function or method. See :ref:`views-extra-options` for an example.
See :ref:`Naming URL patterns <naming-url-patterns>` for why the ``name``
See :ref:`Naming URL patterns <naming-url-patterns>` for why the ``name``
parameter is useful.
parameter is useful.
...
...
docs/topics/http/urls.txt
Dosyayı görüntüle @
a7797577
...
@@ -51,11 +51,17 @@ algorithm the system follows to determine which Python code to execute:
...
@@ -51,11 +51,17 @@ algorithm the system follows to determine which Python code to execute:
3. Django runs through each URL pattern, in order, and stops at the first
3. Django runs through each URL pattern, in order, and stops at the first
one that matches the requested URL.
one that matches the requested URL.
4. Once one of the regexes matches, Django imports and calls the given
4. Once one of the regexes matches, Django imports and calls the given view,
view, which is a simple Python function (or a :doc:`class based view
which is a simple Python function (or a :doc:`class based view
</topics/class-based-views/index>`). The view gets passed an
</topics/class-based-views/index>`). The view gets passed the following
:class:`~django.http.HttpRequest` as its first argument and any values
arguments:
captured in the regex as remaining arguments.
* An instance of :class:`~django.http.HttpRequest`.
* If the matched regular expression returned no named groups, then the
matches from the regular expression are provided as positional arguments.
* The keyword arguments are made up of any named groups matched by the
regular expression, overridden by any arguments specified in the optional
``kwargs`` argument to :func:`django.conf.urls.url`.
5. If no regex matches, or if an exception is raised during any
5. If no regex matches, or if an exception is raised during any
point in this process, Django invokes an appropriate
point in this process, Django invokes an appropriate
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment