I am trying to create messagefile in my django project.
for this, i just wrote this into my home view function:
def startpage(request):
# Translators: This message appears on the home page only
output = _("Welcome to my site.")
and in settings.py
from django.utils.translation import ugettext_lazy as _
LANGUAGES = [
('de', _('German')),
('en', _('English')),
('fr', _('French')),
('es', _('Spanish')),
('pt', _('Portuguese'))
]
and created locale
directory inside my app.
now I am inside my app tree and giving this command:
django-admin.py makemessages --all
it is spitting out this
#!C:\workspace\newsportal\venv_np\Scripts\python.exe
# EASY-INSTALL-SCRIPT: 'django==1.6','django-admin.py'
__requires__ = 'django==1.6'
import pkg_resources
pkg_resources.run_script('django==1.6', 'django-admin.py')
and NOT creating messagefiles inside locale
.
I tried with:
python manage.py makemessages --all
but it cannot find manage.py
because i am inside my app, not in project tree. how is it done normally?