... ED_APPS are provided in the JavaScript output. デフォルト値を使った例 : from django.views.i18n import JavaScriptCatalog urlpatterns = [ path ( "jsi18n/" , JavaScriptCatalog . as_view (), name = "javascript-catalog" ), ] 独自のパッケージを使った例 : urlpa ... avaScriptCatalog . as_view ( packages = [ "your.app.label" ]), name = "javascript-catalog" , ), ] ルートの URLconf が i18n_patterns() 、 JavaScriptCatalog を使っている場合、カタログが正しく生成されるように i18n_patterns() によるラップも必要となります。 i ... 18n_patterns() を使った例 : from django.conf.urls.i18n import i18n_patterns urlpatterns = i18n_patterns ( path ( "jsi18n/" , JavaScript ... ... sing reverse() Django's URL handling is based on a mapping of regex patterns (representing the URLs) to callable views, and Django's own processing consists of matching a requested URL against those ... . Use of reverse() is encouraged for application developers, as the output of reverse() is always based on the current URL patterns, meaning developers do not need to change other code when making changes to URLs. One argument signature for reverse() is ... ... URLs) to callable views, and Django's own processing consists of matching a requested URL against those patterns to determine the appropriate view to invoke. Django also provides a convenience function -- reverse() -- which performs th ... . Use of reverse() is encouraged for application developers, as the output of reverse() is always based on the current URL patterns, meaning developers do not need to change other code when making changes to URLs. One argument signature for reverse() is ... ... nstance assignment data loss check to Model.save() to allow easier usage of in-memory models ( #25160 ). Prevented varchar_patterns_ops and text_patterns_ops indexes for ArrayField ( #25180 ). ... ... deprecated and will be removed in Django 1.10. You can simply remove the {% load ... from future %} tags. django.conf.urls.patterns() In the olden days of Django, it was encouraged to reference views as strings in urlpatterns : urlpatterns = patterns ( " ... string into a real function reference. In order to reduce repetition when referencing many views from the same module, the patterns() function takes a required initial prefix argument which is prepended to all views-as-strings in that set of urlpatterns ... : urlpatterns = patterns ( "myapp.views" , url ( "^$" , "myview" ), url ( "^other/$" , "otherview" ), ) In the modern era, we have updat ... ... mapping of regex patterns (representing the URLs) to callable views, and Django's own processing consists of matching a requested URL against those ... . Use of reverse() is encouraged for application developers, as the output of reverse() is always based on the current URL patterns, meaning developers do not need to change other code when making changes to URLs. One argument signature for reverse() is ... ... d). This allows a much more natural use of URLconfs. For example, this URLconf: from django.conf.urls.defaults import * urlpatterns = patterns ( "" , ( "^myview/$" , "mysite.myapp.views.myview" )) can now be rewritten as: from django.conf.urls.defaults i ... mport * from mysite.myapp.views import myview urlpatterns = patterns ( "" , ( "^myview/$" , myview )) One useful application of this can be seen when using decorators; this change ... t_detail import object_list from mysite.myapp.models import MyModel info = { "queryset" : MyModel . objects . all (), } urlpatterns = patterns ( "" , ( "^myview/$" , login_required ( object_list ), info )) Note that both syntaxes (strings and callables) ... ... ing the admin site, you need to update your root urls.py . Old (0.96) urls.py : from django.conf.urls.defaults import * urlpatterns = patterns ( "" , ( r "^admin/" , include ( "django.contrib.admin.urls" )), # ... the rest of your URLs here ... ) New (1. ... e next two lines enable the admin and load each admin.py file: from django.contrib import admin admin . autodiscover () urlpatterns = patterns ( "" , ( r "^admin/(.*)" , admin . site . root ), # ... the rest of your URLs here ... ) ビュー Use django.form ... he end. Now, Django checks to see whether the pattern without the trailing slash would be matched by something in your URL patterns. If so, no redirection takes place, because it is assumed you deliberately wanted to catch that pattern. For most people, ... ... the authentication and verification steps of login() . URL Regular expression lookaround assertions are now allowed in URL patterns. The application namespace can now be set using an app_name attribute on the included module or object. It can also be set ... by passing a 2-tuple of (<list of patterns>, <application namespace>) as the first argument to include() . System checks have been added for common URL pattern mista ... a tuple as an argument to include() has been replaced by passing the namespace argument to include() . For example: polls_patterns = [ url ( ... ), ] urlpatterns = [ url ( r "^polls/" , include (( polls_patterns , "polls" , "author-polls" ))), ] は、以下 ... ... in included patterns ( #29415 ). Fixed a regression that added an unnecessary subquery to the GROUP BY clause on MySQL when using a RawSQL anno ... 2026年10月08日