{{{
ignored_roots = [os.path.normpath(p) for p in (settings.MEDIA_ROOT,
settings.STATIC_ROOT)]
}}}
This will fail in situations where there is no STATIC_ROOT a/o MEDIA_ROOT,
in which case ignored_roots will be populated with None, causing the
subsequent path operation os.normpath(p) to fail.
This in turn will prevent users from generating the po files for django
apps that do not have any such settings.
In order to fix this, the following code seems to work quite well
{{{
375 ignored_roots = []
376 if settings.MEDIA_ROOT:
377 ignored_roots.extend([os.path.normpath(p) for p in
settings.MEDIA_ROOT])
378 if settings.STATIC_ROOT:
379 ignored_roots.extend([os.path.normpath(p) for p in
settings.STATIC_ROOT])
}}}
----
I am using Django 1.8 installed via PyPi
{{{
# pip2 show django
---
Name: Django
Version: 1.8.dev20141027110112
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24403>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_docs: => 0
* resolution: => duplicate
* needs_tests: => 0
* needs_better_patch: => 0
Comment:
Duplicate of #23717.
As you can see, your 1.8 version is several months old...
--
Ticket URL: <https://code.djangoproject.com/ticket/24403#comment:1>
Comment (by silkentrance):
Oh, great I did search for makemessages / django-admin but did not search
for closed issues as well...
--
Ticket URL: <https://code.djangoproject.com/ticket/24403#comment:2>
Comment (by claudep):
You will get a new release with `pip install --pre ...`
--
Ticket URL: <https://code.djangoproject.com/ticket/24403#comment:3>