Django 2.2.x Documentationmatches, Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view view, which is a Python function. Each view gets passed a request object – which contains request metadata – and the values captured in the pattern. For example, if a user requested the URL “/articles/2005/05/39323/” “/articles/2005/05/39323/”, Django would call the function news.views.article_detail(request, year=2005, month=5, pk=39323). Write your views Each view is responsible for doing one of two things: Returning an0 码力 | 2915 页 | 2.83 MB | 1 年前3
Django 2.1.x Documentationmatches, Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view view, which is a Python function. Each view gets passed a request object – which contains request metadata – and the values captured in the pattern. For example, if a user requested the URL “/articles/2005/05/39323/” “/articles/2005/05/39323/”, Django would call the function news.views.article_detail(request, year=2005, month=5, pk=39323). Write your views Each view is responsible for doing one of two things: Returning an0 码力 | 2790 页 | 2.71 MB | 1 年前3
Django 4.2.x Documentationlogging Pagination The Paginator class Example Paginating a ListView Using Paginator in a view function Security in Django Cross site scripting (XSS) protection Cross site request forgery (CSRF) protection matches, Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view view, which is a Python function. Each view gets passed a request object – which contains request metadata – and the values captured in the pattern. For example, if a user requested the URL “/articles/2005/05/39323/”0 码力 | 3305 页 | 3.16 MB | 1 年前3
Django 2.1.x Documentationmatches, Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view view, which is a Python function. Each view gets passed a request object – which contains request metadata – and the values captured in the pattern. For example, if a user requested the URL “/articles/2005/05/39323/” “/articles/2005/05/39323/”, Django would call the function news.views. article_detail(request, year=2005, month=5, pk=39323). 2.1.6 Write your views Each view is responsible for doing one of two things: Returning0 码力 | 1910 页 | 6.49 MB | 1 年前3
Django 4.1.x Documentationlogging Pagination The Paginator class Example Paginating a ListView Using Paginator in a view function Security in Django Cross site scripting (XSS) protection Cross site request forgery (CSRF) protection matches, Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view view, which is a Python function. Each view gets passed a request object – which contains request metadata – and the values captured in the pattern. For example, if a user requested the URL “/articles/2005/05/39323/”0 码力 | 3240 页 | 3.13 MB | 1 年前3
Django 3.2.x Documentationconfiguration Pagination The Paginator class Example Paginating a ListView Using Paginator in a view function Security in Django Cross site scripting (XSS) protection Cross site request forgery (CSRF) protection matches, Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view view, which is a Python function. Each view gets passed a request object – which contains request metadata – and the values captured in the pattern. For example, if a user requested the URL “/articles/2005/05/39323/”0 码力 | 3121 页 | 3.08 MB | 1 年前3
Django 3.2.x Documentationmatches, Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view view, which is a Python function. Each view gets passed a request object – which contains request metadata – and the values captured in the pattern. For example, if a user requested the URL “/articles/2005/05/39323/” “/articles/2005/05/39323/”, Django would call the function news.views. article_detail(request, year=2005, month=5, pk=39323). 10 Chapter 2. Getting started Django Documentation, Release 3.2.21.dev 2.1.6 Write0 码力 | 2199 页 | 7.89 MB | 1 年前3
Django 1.11.x Documentationthem matches, Django calls a special-case 404 view.) This is blazingly fast, because the regular expressions are compiled at load time. Once one of the regexes matches, Django calls the given view, which which is a Python function. Each view gets passed a request object – which contains request metadata – and the values captured in the regex. For example, if a user requested the URL “/articles/2005/05/39323/” 9323/”, Django would call the function news.views.article_detail(request, '2005', '05', '39323'). Write your views Each view is responsible for doing one of two things: Returning an HttpResponse object0 码力 | 2747 页 | 2.67 MB | 1 年前3
Django 3.1.x Documentationconfiguration Pagination The Paginator class Example Paginating a ListView Using Paginator in a view function Security in Django Cross site scripting (XSS) protection Cross site request forgery (CSRF) protection matches, Django calls a special-case 404 view.) This is blazingly fast, because the paths are compiled into regular expressions at load time. Once one of the URL patterns matches, Django calls the given view view, which is a Python function. Each view gets passed a request object – which contains request metadata – and the values captured in the pattern. For example, if a user requested the URL “/articles/2005/05/39323/”0 码力 | 3094 页 | 3.03 MB | 1 年前3
Django 1.11.x Documentationthem matches, Django calls a special-case 404 view.) This is blazingly fast, because the regular expressions are compiled at load time. Once one of the regexes matches, Django calls the given view, which which is a Python function. Each view gets passed a request object – which contains request metadata – and the values captured in the regex. For example, if a user requested the URL “/articles/2005/05/39323/” 9323/”, Django would call the function news.views. article_detail(request, '2005', '05', '39323'). 2.1.6 Write your views Each view is responsible for doing one of two things: Returning an HttpResponse0 码力 | 1878 页 | 6.40 MB | 1 年前3
共 92 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10













