Blog Archive

Showing posts with label django. Show all posts
Showing posts with label django. Show all posts

Tuesday, 11 June 2013

Django localization settings

This examle shows all the settings that you need to put in your settings file in order to have the Django 1.5 to run in russian language.

ugettext = lambda s: s
LANGUAGES = (
    ('ru', 'Russian'),
)
LOCALE_PATHS = (
    PROJECT_PATH+'/locale', #this is the place where the language files stored
)
LANGUAGE_CODE = 'ru'



If any of these missing, it will not work

Monday, 16 January 2012

Django - Adding row to the admin list with the totals and averages of given fields

Once a while a wild ticked occurred for one of the projects I was developing.
The issue was that they needed a rows with the totals and averages to be displayed at the end of the table in the admin changelist view for particular fields.
So here how it works