سؤال

I've installed the django-admin-bootstrapped module in my django application. When I run cat requirements.txt it shows:

django-admin-bootstrapped==1.6.4

However, when I run the application using python manage.py runserver 8000 using virtualenv, it gives me the following error:

ImportError: No module named django_admin_bootstrapped

What I find funny is that this error arises when I run the application from the terminal. However, if I run this app from my IDE (PyCharm), it runs perfectly. Am I missing out on anything?

EDITS:

OS: Ubuntu 12.04 Python: v2.7 Steps to install module: I used the instructions from this website

If there's any more logs or code that is needed, please let me know. Thanks!

هل كانت مفيدة؟

المحلول

Of course django-admin-bootstrapped IS added in INSTALLED_APPS, otherwise runserver wouldn't complain about the missing module. Please, try what @zymud said and post pip freeze | grep bootstrap output. Anyway, if the module works in pyCharm, i think you have a PATH issue...

Make sure that the directory containing the django-admin-bootstrapped module is in your PYTHONPATH environment variable.

Ps. When dealing with installation issues, it would be great to know something about the system (OS, Python version, steps you made to install the module).

EDIT:

I just noticed you are using virtualenv... did you activate the virtualenv (workon VIRTUAL_ENV_name) before installing django-admin-bootstrapped with pip?

نصائح أخرى

Make sure your module names are the same both in your sitepackage folder and your INSTALLED_APPS in settings.py.

It seems that your module name is "django-admin-bootstrapped" but you set the INSTALLED_APPS like this:

    INSTALLED_APPS = [
        'django_admin_bootstrapped',
    ]

https://pypi.python.org/pypi/bootstrap_admin/0.3.0

Install NOTE: I’m assuming you use pip to install the Python Packages. from latest version on pypi

$ pip install bootstrap-admin

from github master branch

$ pip install git+https://github.com/douglasmiranda/django-admin-bootstrap or clone the master branch in your machine

$ git clone https://github.com/douglasmiranda/django-admin-bootstrap And don’t forget to add bootstrap_admin in INSTALLED_APPS before the django.contrib.admin.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top