Comments (8)
Yes, I agree it should fail more gracefully and only show the exception if TEMPLATE_DEBUG
(https://docs.djangoproject.com/en/dev/ref/settings/#template-debug) is set to True.
Would you like to provide a patch with some tests?
from django-treemenus.
Sure!
from django-treemenus.
$ make test
DJANGO_SETTINGS_MODULE=treemenus.tests.settings django-admin.py test treemenus
Traceback (most recent call last):
File "/home/dhiana/.virtualenvs/dj16/bin/django-admin.py", line 5, in <module>
management.execute_from_command_line()
File "/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
commands = get_commands()
File "/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
apps = settings.INSTALLED_APPS
File "/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
self._setup(name)
File "/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/conf/__init__.py", line 132, in __init__
% (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'treemenus.tests.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named treemenus.tests.settings
make: *** [test] Error 1
I've tried django 1.4 and 1.6. Any hints?
from django-treemenus.
Where did you run the 'make test' command from? Have you tried from the repository's root?
from django-treemenus.
I'm on the repo root. Calling python and importing the settings module
works fine...
(dj16)[dhiana@csrjl06l django-treemenus]$ ls
AUTHORS.txt docs LICENCE.txt Makefile README.rst setup.cfg setup.py
treemenus
(dj16)[dhiana@csrjl06l django-treemenus]$ make test
DJANGO_SETTINGS_MODULE=treemenus.tests.settings django-admin.py test
treemenus
Traceback (most recent call last):
File "/home/dhiana/.virtualenvs/dj16/bin/django-admin.py", line 5, in
<module>
management.execute_from_command_line()
File
"/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/core/management/__init__.py",
line 399, in execute_from_command_line
utility.execute()
File
"/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/core/management/__init__.py",
line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/core/management/__init__.py",
line 261, in fetch_command
commands = get_commands()
File
"/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/core/management/__init__.py",
line 107, in get_commands
apps = settings.INSTALLED_APPS
File
"/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/conf/__init__.py",
line 54, in __getattr__
self._setup(name)
File
"/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/conf/__init__.py",
line 49, in _setup
self._wrapped = Settings(settings_module)
File
"/home/dhiana/.virtualenvs/dj16/lib/python2.7/site-packages/django/conf/__init__.py",
line 132, in __init__
% (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'treemenus.tests.settings' (Is it on
sys.path? Is there an import error in the settings file?): No module named
treemenus.tests.settings
make: *** [test] Error 1
(dj16)[dhiana@csrjl06l django-treemenus]$ python
Python 2.7.5 (default, Jun 26 2014, 11:55:39)
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import treemenus.tests.settings
2014-08-18 17:51 GMT-03:00 Julien Phalip [email protected]:
Where did you run the 'make test' command from? Have you tried from the
repository's root?—
Reply to this email directly or view it on GitHub
#32 (comment)
.
from django-treemenus.
Could you try this?
$ PYTHONPATH=. make test
from django-treemenus.
It worked! Any thoughts on why this is necessary?
2014-09-06 16:05 GMT-03:00 Julien Phalip [email protected]:
Could you try this?
$ PYTHONPATH=. make test
—
Reply to this email directly or view it on GitHub
#32 (comment)
.
from django-treemenus.
Fixed in 4b8882f. Thank you!
from django-treemenus.
Related Issues (20)
- Compatibility with django-grappelli HOT 4
- Treemenus disappearing under Nginx HOT 6
- Django 1.4 Admin URL Change HOT 3
- Please review MANUAL HOT 1
- Treemenus are not appearing HOT 3
- can't compare offset-naive and offset-aware datetimes HOT 1
- Grappelli Related Generic Fields Compatibility
- Item deletion in django 1.5 HOT 9
- Python 3 support HOT 2
- django-treemenus by request
- Use django-mptt to manage underlaying trees
- 'MenuAdmin' object has no attribute '__name__' HOT 1
- cannot import name TOKEN_BLOCK
- imports fail on django 1.9.4 HOT 1
- Any bump idea about treemenus + fluent-contents?
- Screenshot in manual
- README, app is outdated now, let's choose next maintainer and update pip version HOT 3
- This project is dead?
- in django 2 it's not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-treemenus.