Return the year for which this view should display data.
(self)
| 32 | return self.year_format |
| 33 | |
| 34 | def get_year(self): |
| 35 | """Return the year for which this view should display data.""" |
| 36 | year = self.year |
| 37 | if year is None: |
| 38 | try: |
| 39 | year = self.kwargs["year"] |
| 40 | except KeyError: |
| 41 | try: |
| 42 | year = self.request.GET["year"] |
| 43 | except KeyError: |
| 44 | raise Http404(_("No year specified")) |
| 45 | return year |
| 46 | |
| 47 | def get_next_year(self, date): |
| 48 | """Get the next valid year.""" |
no test coverage detected