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
6da14072
Kaydet (Commit)
6da14072
authored
Eyl 25, 2017
tarafından
Christopher Schäpers
Kaydeden (comit)
Tim Graham
Eyl 25, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #28627 -- Added slug converter to some path() examples in docs.
üst
c0d968ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
generic-display.txt
docs/ref/class-based-views/generic-display.txt
+1
-1
urls.txt
docs/topics/http/urls.txt
+2
-2
translation.txt
docs/topics/i18n/translation.txt
+4
-4
No files found.
docs/ref/class-based-views/generic-display.txt
Dosyayı görüntüle @
6da14072
...
...
@@ -59,7 +59,7 @@ many projects they are typically the most commonly used views.
from article.views import ArticleDetailView
urlpatterns = [
path('<slug>/', ArticleDetailView.as_view(), name='article-detail'),
path('<slug
:slug
>/', ArticleDetailView.as_view(), name='article-detail'),
]
**Example myapp/article_detail.html**:
...
...
docs/topics/http/urls.txt
Dosyayı görüntüle @
6da14072
...
...
@@ -80,7 +80,7 @@ Here's a sample URLconf::
path('articles/2003/', views.special_case_2003),
path('articles/<int:year>/', views.year_archive),
path('articles/<int:year>/<int:month>/', views.month_archive),
path('articles/<int:year>/<int:month>/<slug>/', views.article_detail),
path('articles/<int:year>/<int:month>/<slug
:slug
>/', views.article_detail),
]
Notes:
...
...
@@ -200,7 +200,7 @@ Here's the example URLconf from earlier, rewritten using regular expressions::
path('articles/2003/', views.special_case_2003),
re_path('articles/(?P<year>[0-9]{4})/', views.year_archive),
re_path('articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/', views.month_archive),
re_path('articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<slug>[
^/
]+)/', views.article_detail),
re_path('articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/(?P<slug>[
\w-_
]+)/', views.article_detail),
]
This accomplishes roughly the same thing as the previous example, except:
...
...
docs/topics/i18n/translation.txt
Dosyayı görüntüle @
6da14072
...
...
@@ -1315,8 +1315,8 @@ Example URL patterns::
news_patterns = ([
path('', news_views.index, name='index'),
path('category/<slug>/', news_views.category, name='category'),
path('<slug>/', news_views.details, name='detail'),
path('category/<slug
:slug
>/', news_views.category, name='category'),
path('<slug
:slug
>/', news_views.details, name='detail'),
], 'news')
urlpatterns += i18n_patterns(
...
...
@@ -1385,8 +1385,8 @@ URL patterns can also be marked translatable using the
news_patterns = ([
path('', news_views.index, name='index'),
path(_('category/<slug>/'), news_views.category, name='category'),
path('<slug>/', news_views.details, name='detail'),
path(_('category/<slug
:slug
>/'), news_views.category, name='category'),
path('<slug
:slug
>/', news_views.details, name='detail'),
], 'news')
urlpatterns += i18n_patterns(
...
...
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