CrateMuncher/BitVid — pull request #2 by ztstewart (2013-12-08 23:32:31+00:00)
Title: Refactor URLs and Channel views

This pull request makes the following changes:

1. All of the Channel views, including creation, viewing a single Channel, and showing a user's Channels has been switched over to Django's generic Class Based Views.
2. The Home and 404 views are switched to Class Based Views
3. All of the main app URLs are moved to main.urls, and bitvid.urls is modified to include these URLs also
4. The Channel create view now uses a Django ModelForm class for validation
5. A stub ModelForm class for Login was created, for future incorporation and for demonstration of how ModelForm classes are declared
6. A LoginRequired mixin class is declared to mimic login_required but for class based views
7. Channel model class had get_absolute_url defined, a method which Django uses to look up the URL of where that instance is at. This is used for the redirection from the creation form and in the future would be used for editing.

This continues refactoring code into a more maintainable state, demonstrates the use of CBVs, and has a handful of minor improvements such as allowing the HTTP PUT method for creating new Channel objects.