Note
This documentation only documents the differences between Django and Tincture. For all other functionality, see Django’s documentation.
A SQLAlchemy session instance.
Returns a SQLAlchemy session instance. By default, this returns SessionMixin.session.
The SQLAlchemy model that this view will display data for. Specifying model = Foo is effectively the same as specifying query_object = session.query(Foo).
A SQLAlchemy Query object.
A SQLAlchemy Session instance. This session will be used to generate a Query object for the view.
A tuple of URLconf keword argument names that comprise the primary key. The default is ('pk',). Note that this is named differently from Django’s SingleObjectMixin.pk_url_kwarg.
Returns the single object this view will display. If query_object is provided, it will be used to obtain the object. Otherwise, get_query_object() will be used.
Returns the SQLAlchemy Query object that represents the data this view will display.
Returns a list of template names. In addition to the template names from Django that aren’t based on the model, this returns:
Note
With SQLAlchemy there’s no built-in way to detect an app name, so you may want to provide your own implementation of this method to make template discovery more robust.
See Django’s SingleObjectTemplateResponseMixin.get_template_names.
The SQLAlchemy model that this view will display data for. Specifying model = Foo is effectively the same as specifying query_object = session.query(Foo).
A SQLAlchemy Query object.
A SQLAlchemy Session instance. This session will be used to generate a Query object for the view.
Returns the SQLAlchemy Query object that represents the data this view will display.
Returns the context variable name that will be used to contain the list of data that this view is manipulating. If object_list is a SQLAlchemy Query object, it’ll use the lowercased name of the first entity in the query. For example, a query for the Person and Dog models will return ‘person_list’.
Returns a list of template names. In addition to the template names from Django that aren’t based on the model, this returns:
The Query object’s first entity is used to retrieve the class name used here.
Note
With SQLAlchemy there’s no built-in way to detect an app name, so you may want to provide your own implementation of this method to make template discovery more robust.
See Django’s MultipleObjectTemplateResponseMixin.get_template_names.
See Django’s DetailView.
Mixins
See Django’s ListView.
Mixins