Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete Norwegian translation (kill me now)
- Loading branch information
Showing
11 changed files
with
1,593 additions
and
362 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
from django.shortcuts import render_to_response | ||
from django.utils.translation import ugettext as _ | ||
|
||
from aligulac.cache import cache_page | ||
from aligulac.tools import base_ctx | ||
from aligulac.tools import ( | ||
base_ctx, | ||
Message, | ||
) | ||
|
||
from blog.models import Post | ||
|
||
@cache_page | ||
def blog(request): | ||
base = base_ctx('About', 'Blog', request) | ||
|
||
if request.LANGUAGE_CODE != 'en': | ||
base['messages'].append(Message( | ||
_('The blog/news section is only in English, sorry.'), | ||
type=Message.INFO, | ||
)) | ||
|
||
base['blogposts'] = Post.objects.all()[:10] | ||
return render_to_response('blog.html', base) |
Oops, something went wrong.