id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 7684 ugettext() in app `__init__.py` causes error. Julien Phalip nobody "*Please note*: I know this may look like it belongs to the user mailing list, but in [1] we thought Trac would be a better place for it. I'm having a strange import issue since I have upgraded my project to NFA. To illustrate the issue I've attached a ZIP with very simple code. Basically, the project won't run (that is, when the server is restarted and tries to launch Django). I get the error: ""ImportError: cannot import name MenuItem"". Now, what is very strange here, is that I can get rid of the error in two different ways: 1) Either by swapping the order of the apps in INSTALLED_APPS: From: {{{ INSTALLED_APPS = ( 'menu', 'menu_extension', ) }}} To: {{{ INSTALLED_APPS = ( 'menu_extension', 'menu', ) }}} 2) Or by Removing the ugettext call in menu.models: From: {{{ caption = models.CharField(_('Caption'), max_length=50) }}} To: {{{ caption = models.CharField('Caption', max_length=50) }}} Weird! Does that example uncover a bug in Django or rather my misuse of Python and/or NFA? I'm using newforms-admin-SVN-7871. [1] http://groups.google.com/group/django-users/browse_thread/thread/9427e8e78b199441#" closed Internationalization dev invalid Accepted 0 0 0 0 0 0