Created
June 3, 2013 14:38
-
-
Save 1st/5698633 to your computer and use it in GitHub Desktop.
My example of code for Django project
This file contains 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
''' | |
My example of code for Django project | |
See also my Open Source project here: https://github.com/1st/django-startup | |
@author Anton Danilchenko <anton.danilchenko@me.com> | |
''' | |
# app_name/urls.py | |
# app_name/views.py | |
from tools.views import View | |
class Blog(View): | |
request_filters = {'login_required': True} | |
def get(self, blog_id): | |
blog = self.get_object_or_404(Blog, id=blog_id) | |
return self.render('app_name/blog.html', {'blog': blog}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment