Django 2.2.x Documentation
four arguments, two required: route and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for. path() argument: route route is a string that contains view function with an HttpRequest object as the first argument and any “captured” values from the route as keyword arguments. We’ll give an example of this in a bit. path() argument: kwargs Arbitrary control all database operations on models in the auth and contenttypes applications. """ route_app_labels = {'auth', 'contenttypes'} def db_for_read(self, model, **hints): """0 码力 | 2915 页 | 2.83 MB | 1 年前3Django 2.2.x Documentation
four arguments, two required: route and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for. path() argument: route route is a string that contains view function with an HttpRequest object as the first argument and any “captured” values from the route as keyword arguments. We’ll give an example of this in a bit. path() argument: kwargs Arbitrary """ route_app_labels = {'auth', 'contenttypes'} def db_for_read(self, model, **hints): """ Attempts to read auth and contenttypes models go to auth_db. """ if model._meta.app_label in self.route_app_labels:0 码力 | 2060 页 | 7.23 MB | 1 年前3Django 4.0.x Documentation
four arguments, two required: route and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for. path() argument: route route is a string that contains view function with an HttpRequest object as the first argument and any “captured” values from the route as keyword arguments. We’ll give an example of this in a bit. path() argument: kwargs Arbitrary """ route_app_labels = {'auth', 'contenttypes'} def db_for_read(self, model, **hints): """ Attempts to read auth and contenttypes models go to auth_db. """ if model._meta.app_label in self.route_app_labels:0 码力 | 2248 页 | 7.90 MB | 1 年前3Django 3.2.x Documentation
four arguments, two required: route and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for. path() argument: route route is a string that contains view function with an HttpRequest object as the first argument and any “captured” values from the route as keyword arguments. We’ll give an example of this in a bit. path() argument: kwargs Arbitrary """ route_app_labels = {'auth', 'contenttypes'} def db_for_read(self, model, **hints): """ Attempts to read auth and contenttypes models go to auth_db. """ if model._meta.app_label in self.route_app_labels:0 码力 | 2199 页 | 7.89 MB | 1 年前3Django 3.1.x Documentation
four arguments, two required: route and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for. path() argument: route route is a string that contains view function with an HttpRequest object as the first argument and any “captured” values from the route as keyword arguments. We’ll give an example of this in a bit. 18 Chapter 2. Getting started Django """ route_app_labels = {'auth', 'contenttypes'} def db_for_read(self, model, **hints): """ Attempts to read auth and contenttypes models go to auth_db. """ if model._meta.app_label in self.route_app_labels:0 码力 | 2053 页 | 6.92 MB | 1 年前3Django 4.2.x Documentation
four arguments, two required: route and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for. path() argument: route route is a string that contains view function with an HttpRequest object as the first argument and any “captured” values from the route as keyword arguments. We’ll give an example of this in a bit. path() argument: kwargs Arbitrary control all database operations on models in the auth and contenttypes applications. """ route_app_labels = {"auth", "contenttypes"} def db_for_read(self, model, **hints): """0 码力 | 3305 页 | 3.16 MB | 1 年前3Django 4.1.x Documentation
four arguments, two required: route and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for. path() argument: route route is a string that contains view function with an HttpRequest object as the first argument and any “captured” values from the route as keyword arguments. We’ll give an example of this in a bit. path() argument: kwargs Arbitrary control all database operations on models in the auth and contenttypes applications. """ route_app_labels = {'auth', 'contenttypes'} def db_for_read(self, model, **hints): """0 码力 | 3240 页 | 3.13 MB | 1 年前3Django 4.0.x Documentation
four arguments, two required: route and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for. path() argument: route route is a string that contains view function with an HttpRequest object as the first argument and any “captured” values from the route as keyword arguments. We’ll give an example of this in a bit. path() argument: kwargs Arbitrary control all database operations on models in the auth and contenttypes applications. """ route_app_labels = {'auth', 'contenttypes'} def db_for_read(self, model, **hints): """0 码力 | 3184 页 | 3.14 MB | 1 年前3Django 3.2.x Documentation
four arguments, two required: route and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for. path() argument: route route is a string that contains view function with an HttpRequest object as the first argument and any “captured” values from the route as keyword arguments. We’ll give an example of this in a bit. path() argument: kwargs Arbitrary control all database operations on models in the auth and contenttypes applications. """ route_app_labels = {'auth', 'contenttypes'} def db_for_read(self, model, **hints): """0 码力 | 3121 页 | 3.08 MB | 1 年前3Django 3.1.x Documentation
four arguments, two required: route and view, and two optional: kwargs, and name. At this point, it’s worth reviewing what these arguments are for. path() argument: route route is a string that contains view function with an HttpRequest object as the first argument and any “captured” values from the route as keyword arguments. We’ll give an example of this in a bit. path() argument: kwargs Arbitrary control all database operations on models in the auth and contenttypes applications. """ route_app_labels = {'auth', 'contenttypes'} def db_for_read(self, model, **hints): """0 码力 | 3094 页 | 3.03 MB | 1 年前3
共 49 条
- 1
- 2
- 3
- 4
- 5