Reputation: 5303
I have django-registration installed. I just updated my Python installation from 2.5 to 2.7.
Everything works okay but when I try to run my Django app, I get the error below.
C:\django\pley>python manage.py runserver
Validating models...
Unhandled exception in thread started by <function inner_run at 0x02FA6830>
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.
py", line 48, in inner_run
self.validate(display_num_errors=True)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 249,
in validate
num_errors = get_validation_errors(s, app)
File "C:\Python27\lib\site-packages\django\core\management\validation.py", lin
e 28, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "C:\Python27\lib\site-packages\django\db\models\loading.py", line 146, in
get_app_errors
self._populate()
File "C:\Python27\lib\site-packages\django\db\models\loading.py", line 64, in
_populate
self.load_app(app_name)
File "C:\Python27\lib\site-packages\django\db\models\loading.py", line 78, in
load_app
models = import_module('.models', app_name)
File "C:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in im
port_module
__import__(name)
File "C:\django\pley\..\pley\accounts\models.py", line 3, in <module>
from registration import signals
ImportError: cannot import name signals
If you need more details, like the code for the other files, just comment on this question so that I can update.
Upvotes: 0
Views: 4193
Reputation: 5303
Okay, I'm going to answer this myself. Thanks to bahamas from #django freenode.
First go to your Python shell
>>> import registration
>>> print registration.__file__
/home/wenbert/.local/lib/python/registration/__init__.pyc
Do a:
$ ls -la /home/wenbert/.local/lib/python/registration
I did not find signals.py
in the directory.
So, download the tar.gz file from: https://bitbucket.org/ubernostrum/django-registration/src and reinstall.
TL;DR I had a broken a installation (no signals.py) of django-registration. Download from source and reinstall manually.
Upvotes: 0
Reputation: 73638
Seems ok to me. When you unpack django-registration you get 2 folders doc
and registration
. In registration
folder you have a file called signals.py
. This is precisely the file that your django app is trying to import.
Either see if you have added django-registration
as INSTALLED_APPS in your project settings.py.
Upvotes: 1