Closed ikresoft closed 11 years ago
app_resolver
is unknown to me.
It doesn't seems to be a django.js error.
Can you describe a little bit more the problem ?
Environment:
Request Method: GET Request URL: http://www.faretti-shoes.com/djangojs/urls
Django Version: 1.4.2 Python Version: 2.6.6 Installed Applications: ('admin_tools', 'admin_tools.theming', 'admin_tools.menu', 'admin_tools.dashboard', 'is_admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.comments', 'django.contrib.sitemaps', 'djangojs', 'dajaxice', 'tagging', 'pagination', 'filebrowser', 'ikresoft.ext', 'tinymce', 'cms', 'mptt', 'menus', 'south', 'reversion', 'sekizai', 'cms.plugins.flash', 'cms.plugins.link', 'cms.plugins.snippet', 'cms.plugins.text', 'cms.plugins.twitter', 'cms.plugins.inherit', 'cmsplugin_youtube', 'cmsplugin_contact', 'ikresoft.gallery', 'ikresoft.articles', 'registration', 'profiles', 'haystack', 'rosetta', 'nani', 'filer', 'cmsplugin_filer_file', 'cmsplugin_filer_folder', 'cmsplugin_filer_image', 'cmsplugin_filer_teaser', 'cmsplugin_filer_video', 'categories', 'ikresoft.editor', 'openshop', 'shop', 'shop.addressmodel', 'ikresoft.barkod', 'sifarnik', 'kolekcija', 'proizvodnja', 'zaposleni', 'plate', 'debug_toolbar') Installed Middleware: ('django.middleware.gzip.GZipMiddleware', 'django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.doc.XViewMiddleware', 'pagination.middleware.PaginationMiddleware', 'cms.middleware.multilingual.MultilingualURLMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.toolbar.ToolbarMiddleware')
Traceback: File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py" in get_response
Exception Type: ImportError at /djangojs/urls Exception Value: No module named app_resolver
OK, it seems to be specific to django-cms way of resolving apps: https://github.com/divio/django-cms/blob/master/cms/appresolver.py.
I'll try to fix this issue as soon as possible (I never used django-cms, I'll need to investigate).
Can you provide a sample project to reproduce the bug ? I will try to fix it before the next release (soon)
django-cms is using this appresolver to resolve extra apps that doesn't exist in INSTALLED_APPS, so if there dynamic apps connected to pages, appresolver is puting urls of apps to root cms urls.
here's your sample: https://github.com/szelga/js-cms-test (sorry if it's too late).
OK, i managed to fix it: https://github.com/szelga/django.js/commit/10d5082b8c03ab2ecd606fead25a07353a92131c it's kinda quick and dirty, so i dare not to offer it as a pull request. tested with django-cms 2.4.2
It's never too late !!!
I will look at your sample project et your fix ASAP.
2 possibilities:
I can't reproduce the bug with the sample project. With both the provided version (4738b194b273f162032ac57131360c9e0aa65f58 aka. the current master) and the latest stable (0.7.6), I have no error when accessing http://localhost:8000/djangojs/init.js. Am I missing something?
have you created (and published) any django-cms pages? preferrably 2: one standard page and one with an application attached (i have provided a sample application in the project).
Yep, I created pages with and without application, nested pages... no errors.
I excuded admin URLs for better readabiity:
JS_URLS_NAMESPACES_EXCLUDE = (
'admin',
)
and got this:
{
"django_js_urls": "/djangojs/urls",
"myapp-view2": "/test/",
"js_catalog": "/djangojs/translation",
"django_js_context": "/djangojs/context",
"pages-root": "/",
"django_js_init": "/djangojs/init.js",
"pages-details-by-slug": "/<slug>/"
}
Are you expecting the pages to appears in ?
OK, I'll test it today.
OK, I reproduce the bug but I need to restart the server.
I just took the try...except part of your fix, not the refactoring. Maybe I'll do this refactoring one day, but not as part of a fix.
And thanks for the fix !
after using 0.3.2 version I get this error No module named app_resolver?