GithubHelp home page GithubHelp logo

Comments (5)

superbobry avatar superbobry commented on June 2, 2024

@feuervogel, why do you add those treemenus.* lines to INSTALLED_APPS? simply adding treemenus is enough. have you read django documentation on testing?

from django-treemenus.

feuervogel avatar feuervogel commented on June 2, 2024

hi, ok, I've added only the 'treemenus' app to installed_apps. when running

python manage.py test treemenus

I receive an

ImportError: No module named fake_menu_extension

11 tests, with 11 errors.

obviously this doesn't work:

(bbmain)jmoritz@laptop:~/workspace/bodyboom-main$ python manage.py shell
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from treemenus.tests import fake_menu_extension
>>> from django.db.models.loading import load_app
>>> from django.conf import settings
>>> settings.INSTALLED_APPS += ['treemenus.tests.fake_menu_extension']
>>> load_app('fake_menu_extension')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/jmoritz/.virtualenvs/bbmain/lib/python2.6/site-packages    
/Django-1.2.3-py2.6.egg/django/db/models/loading.py", line 76, in load_app
    app_module = import_module(app_name)
  File "/home/jmoritz/.virtualenvs/bbmain/lib/python2.6/site-packages/Django-    
1.2.3-py2.6.egg/django/utils/importlib.py", line 35, in import_module

__import__(name)
ImportError: No module named fake_menu_extension

from django-treemenus.

feuervogel avatar feuervogel commented on June 2, 2024

instead, this one works:

 >>> load_app('treemenus.tests.fake_menu_extension')

seems to be the bugfix for the problem above.

from django-treemenus.

jphalip avatar jphalip commented on June 2, 2024

Hello,

So is this ticket resolved?

from django-treemenus.

jphalip avatar jphalip commented on June 2, 2024

Oops, never mind, I hadn't seen it was closed already.

from django-treemenus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.