This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from from django.views.generic import TemplateView | |
| # Works for all concreate class-based generic views | |
| # except RedirectView and View | |
| class ExampleView(TemplateView): | |
| ''' | |
| override the get_context_class and pass the additional | |
| data to it. Every class that Inherit the ContextMixin | |
| implements this function. | |
| ''' |