我对芹菜有点问题,我不知道为什么它使用不同的本地化然后我的django项目。 这是错误:
[2012-09-05 16:15:02,945: ERROR/MainProcess] Task kan.mailing.tasks.resend_task[91430f30-893e-4a75-8cf9-47c4b7ac8f04] raised exception: ImproperlyConfigured("MenuPositionAdmin.list_display[1], 'title_en_us' is not a callable or an attribute of 'MenuPositionAdmin' or found in the model 'MenuPosition'.",)
Traceback (most recent call last):
File "/home/necromac/work/kan/lib/python2.7/site-packages/celery/task/trace.py", line 224, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/necromac/work/kan/src/kan/mailing/tasks.py", line 44, in resend_task
result=my_mail_send(t, c, subject=mailing_ob.subject, to=[mail_list_entry_ob.email.email] ,from_email=mailing_ob.reply_to )
File "/home/necromac/work/kan/src/kan/utils/helpers.py", line 291, in my_mail_send
text_content = template.render(context)
Project Langueges就是这样,所以我不知道芹菜在哪里得到_en_us表。
LANGUAGES = (('pl', _('pl')),
('en', _('en')),
('de', _('de')),
('ru', _('ru')),
('fr', _('fr')),
('es', _('es')))
LANGUAGES_AVAILABLE = ('pl','en', 'de')
这是问题的根源
html_content = template.render(context)