diff options
| author | Tim Graham <timograham@gmail.com> | 2013-06-05 12:55:50 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-06-05 12:55:58 -0400 |
| commit | bb863faecd3e1d785933bce7cef7e4b4b28dc3d5 (patch) | |
| tree | 769fb784a0b9c62524e4f4674b5738a5d8098c2a /docs/ref/contrib | |
| parent | b00c6371afab778ab6c6206fb2dbb3f2c7f750b4 (diff) | |
Proofed the 1.6 release notes
Diffstat (limited to 'docs/ref/contrib')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 5 | ||||
| -rw-r--r-- | docs/ref/contrib/syndication.txt | 34 |
2 files changed, 22 insertions, 17 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 8f457e77ac..11bc2c7268 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -1026,8 +1026,9 @@ subclass:: Performs a full-text match. This is like the default search method but uses an index. Currently this is only available for MySQL. - If you need to customize search you can use :meth:`ModelAdmin.get_search_results` to provide additional or alternate - search behaviour. + If you need to customize search you can use + :meth:`ModelAdmin.get_search_results` to provide additional or alternate + search behavior. Custom template options ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt index 02159c415b..51d038d187 100644 --- a/docs/ref/contrib/syndication.txt +++ b/docs/ref/contrib/syndication.txt @@ -137,25 +137,29 @@ into those elements. See `a complex example`_ below that uses a description template. - There is also a way to pass additional information to title and description - templates, if you need to supply more than the two variables mentioned - before. You can provide your implementation of ``get_context_data`` method - in your Feed subclass. For example:: + .. method:: Feed.get_context_data(self, **kwargs) - from mysite.models import Article - from django.contrib.syndication.views import Feed + .. versionadded:: 1.6 - class ArticlesFeed(Feed): - title = "My articles" - description_template = "feeds/articles.html" + There is also a way to pass additional information to title and description + templates, if you need to supply more than the two variables mentioned + before. You can provide your implementation of ``get_context_data`` method + in your ``Feed`` subclass. For example:: - def items(self): - return Article.objects.order_by('-pub_date')[:5] + from mysite.models import Article + from django.contrib.syndication.views import Feed - def get_context_data(self, **kwargs): - context = super(ArticlesFeed, self).get_context_data(**kwargs) - context['foo'] = 'bar' - return context + class ArticlesFeed(Feed): + title = "My articles" + description_template = "feeds/articles.html" + + def items(self): + return Article.objects.order_by('-pub_date')[:5] + + def get_context_data(self, **kwargs): + context = super(ArticlesFeed, self).get_context_data(**kwargs) + context['foo'] = 'bar' + return context And the template: |
