home / pelican

content

1 row where author = "ryan", published_date = "2019-11-03" and "published_date" is on date 2019-11-03

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: published_date (date)

slug ▼ author category content published_date summary title url
cbv-template-view ryan technology From [Classy Class Based Views](http://ccbv.co.uk/projects/Django/2.2/django.views.generic.base/TemplateView/) the `TemplateView` will > > Render a template. Pass keyword arguments from the URLconf to the context. It is an extended version of the `View` CBV with the the `ContextMixin` and the `TemplateResponseMixin` added to it. It has several attributes that can be set * content_type: will allow you to define the MIME type that the page will return. The default is `DEFAULT\_CONTENT\_TYPE` but can be overridden with this attribute. * extra_context: this can be used as a keyword argument in the `as\_view()` but not in the class of the CBV. Adding it there will do nothing * http_method_name: derived from `View` and has the same definition * response_classes: The response class to be returned by render_to_response method it defaults to a TemplateResponse. See below for further discussion * template_engine: can be used to specify which template engine to use IF you have configured the use of multiple template engines in your `settings.py` file. See the [Usage](https://docs.djangoproject.com/en/2.2/topics/templates/#usage) section of the Django Documentation on Templates * template_name: this attribute is required IF the method `get\_template\_names()` is not used. ## More on `response_class` This confuses the ever living crap out of me. The best (only) explanation I have found is by GitHub user `spapas` in his article [Django non-HTML responses](https://spapas.github.io/2014/09/15/django-non-html- responses/#rendering-to-non-html): > > From the previous discussion we can conclude that if your non-HTML > response needs a template then you just need to create a subclass of > TemplateResponse and assign it to the response _class attribute (and also > change the content_ type attribute). On the other hand, if your non-HTML > respond does not need a template to be rendered then you have to override > render _to_ response completely (since the template parameter does not need > to be passed now) and eith… 2019-11-03 From [Classy Class Based Views](http://ccbv.co.uk/projects/Django/2.2/django.views.generic.base/TemplateView/) the `TemplateView` will > > Render a template. Pass keyword arguments from the URLconf to the context. It is an extended version of the `View` CBV with the the `ContextMixin` and the `TemplateResponseMixin` added to it. It has several attributes that can be set * content_type: will allow … CBV - Template View https://www.ryancheley.com/2019/11/03/cbv-template-view/

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [content] (
   [author] TEXT,
   [category] TEXT,
   [content] TEXT,
   [published_date] TEXT,
   [slug] TEXT PRIMARY KEY,
   [summary] TEXT,
   [title] TEXT,
   [url] TEXT
);
Powered by Datasette · Queries took 16.821ms