-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6172bae
commit 319373c
Showing
7 changed files
with
4 additions
and
60 deletions.
There are no files selected for viewing
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
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
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
Empty file.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,2 @@ | ||
# Create your views here. | ||
#from django.utils.text import slugify | ||
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotFound, HttpResponseForbidden | ||
#from django.contrib.auth.decorators import login_required | ||
#from django.shortcuts import get_object_or_404, render_to_response | ||
#from django.core.paginator import Paginator, PageNotAnInteger | ||
#from django.contrib.auth.models import User | ||
#from django.core.urlresolvers import reverse | ||
#from django.contrib import messages | ||
#from django.views.decorators.cache import cache_page, never_cache | ||
from articles.models import Article | ||
from django.template import RequestContext, loaderne | ||
from django.conf import settings | ||
|
||
def home(request): | ||
page_size = 10 | ||
t = loader.get_template('home.html') | ||
c = RequestContext(request, { | ||
'articles': Article.objects.filter(published=True).filter(is_page=False).order_by('-created')[:page_size], | ||
'header_image': getattr(settings, 'homepage_image', None), | ||
'homepage': True, | ||
}) | ||
return HttpResponse(t.render(c)) |