diff options
| author | Adam Johnson <me@adamj.eu> | 2020-05-01 13:37:21 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-05-04 12:10:47 +0200 |
| commit | d17b380653da5f95885ce53468fe7aac60672841 (patch) | |
| tree | 9fbe962d480093a45cf238d22596812637765c74 /docs/topics/class-based-views | |
| parent | 787981f9d1d5abc489a0b069e3353b8ad7aa9778 (diff) | |
Refs #30573 -- Rephrased "Of Course" and "Obvious(ly)" in documentation and comments.
Diffstat (limited to 'docs/topics/class-based-views')
| -rw-r--r-- | docs/topics/class-based-views/generic-display.txt | 12 | ||||
| -rw-r--r-- | docs/topics/class-based-views/mixins.txt | 13 |
2 files changed, 11 insertions, 14 deletions
diff --git a/docs/topics/class-based-views/generic-display.txt b/docs/topics/class-based-views/generic-display.txt index a24e8c5494..66590849a0 100644 --- a/docs/topics/class-based-views/generic-display.txt +++ b/docs/topics/class-based-views/generic-display.txt @@ -277,10 +277,9 @@ with the most recent first:: queryset = Book.objects.order_by('-publication_date') context_object_name = 'book_list' -That's a pretty minimal example, but it illustrates the idea nicely. Of course, -you'll usually want to do more than just reorder objects. If you want to -present a list of books by a particular publisher, you can use the same -technique:: +That's a pretty minimal example, but it illustrates the idea nicely. You'll +usually want to do more than just reorder objects. If you want to present a +list of books by a particular publisher, you can use the same technique:: from django.views.generic import ListView from books.models import Book @@ -390,9 +389,8 @@ using to keep track of the last time anybody looked at that author:: headshot = models.ImageField(upload_to='author_headshots') last_accessed = models.DateTimeField() -The generic ``DetailView`` class, of course, wouldn't know anything about this -field, but once again we could easily write a custom view to keep that field -updated. +The generic ``DetailView`` class wouldn't know anything about this field, but +once again we could write a custom view to keep that field updated. First, we'd need to add an author detail bit in the URLconf to point to a custom view:: diff --git a/docs/topics/class-based-views/mixins.txt b/docs/topics/class-based-views/mixins.txt index 7ec8cc915e..02594b952a 100644 --- a/docs/topics/class-based-views/mixins.txt +++ b/docs/topics/class-based-views/mixins.txt @@ -174,12 +174,11 @@ specialized date-based list views.) Using Django's class-based view mixins ====================================== -Now we've seen how Django's generic class-based views use the provided -mixins, let's look at other ways we can combine them. Of course we're -still going to be combining them with either built-in class-based -views, or other generic class-based views, but there are a range of -rarer problems you can solve than are provided for by Django out of -the box. +Now we've seen how Django's generic class-based views use the provided mixins, +let's look at other ways we can combine them. We're still going to be combining +them with either built-in class-based views, or other generic class-based +views, but there are a range of rarer problems you can solve than are provided +for by Django out of the box. .. warning:: @@ -556,7 +555,7 @@ already know that calling :meth:`~django.views.generic.base.View.as_view()` on a class-based view gives us something that behaves exactly like a function based view, so we can do that at the point we choose between the two subviews. -You can of course pass through keyword arguments to +You can pass through keyword arguments to :meth:`~django.views.generic.base.View.as_view()` in the same way you would in your URLconf, such as if you wanted the ``AuthorInterest`` behavior to also appear at another URL but using a different template:: |
