I played with Django Mezzanine [http://mezzanine.jupo.org/] and when
creating the database with the following settings:
{{{
USE_MODELTRANSLATION = True
LANGUAGE_CODE = 'en'
LANGUAGES = (
('en', _('English')),
('fr', _('French'))
)
}}}
and executing
{{{
python manage.py createdb
}}}
as mentionned on mezzanine's website, I get the following Traceback after
having provided my login / email / pwd and saying that I want to translate
fields:
{{{
[...]
Django-modeltranslation is installed for this project and you have
specified to use i18n.
Would you like to update translation fields from the default ones?
(yes/no): yes
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_from_command_line(sys.argv)
File "/home/ge0/envs/bakadeshi/lib/python3.5/site-
packages/django/core/management/__init__.py", line 367, in
execute_from_command_line
utility.execute()
File "/home/ge0/envs/bakadeshi/lib/python3.5/site-
packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ge0/envs/bakadeshi/lib/python3.5/site-
packages/django/core/management/base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/ge0/envs/bakadeshi/lib/python3.5/site-
packages/django/core/management/base.py", line 345, in execute
output = self.handle(*args, **options)
File "/home/ge0/envs/bakadeshi/lib/python3.5/site-
packages/mezzanine/core/management/commands/createdb.py", line 61, in
handle
func()
File "/home/ge0/envs/bakadeshi/lib/python3.5/site-
packages/mezzanine/core/management/commands/createdb.py", line 151, in
translation_fields
verbosity=self.verbosity, interactive=False)
File "/home/ge0/envs/bakadeshi/lib/python3.5/site-
packages/django/core/management/base.py", line 314, in execute
if options['no_color']:
KeyError: 'no_color'
}}}
Python version: 3.5.2
Installed packages:
{{{
Mezzanine==4.2.2
django-modeltranslation
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27366>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_docs: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_better_patch: => 0
Comment:
Django is likely not at fault, see :ticket:26315#comment:7.
--
Ticket URL: <https://code.djangoproject.com/ticket/27366#comment:1>
Comment (by Geoffrey R.):
I made a Pull Request on github to fix this issue:
https://github.com/django/django/pull/7412
--
Ticket URL: <https://code.djangoproject.com/ticket/27366#comment:2>
Comment (by Geoffrey R.):
Replying to [comment:1 Tim Graham]:
> Django is likely not at fault, see :ticket:26315#comment:7.
Alright, I'll submit a patch to mezzanine then.
Sorry for the inconvenience.
--
Ticket URL: <https://code.djangoproject.com/ticket/27366#comment:3>