Problem with Django-1.3 beta

◇◆丶佛笑我妖孽 提交于 2020-01-03 07:27:06

问题


Guys!! I'm really enthusiastic in learning django and learnt a bit on Django-1.2 but then I installed 1.3 version which is ok till I run the server using the command "python manage.py runserver". It's giving a huge error. I can't figure out a way to solve this. And error is given as :

Traceback (most recent call last):    

  File "manage.py", line 11, in <module>    
    execute_manager(settings)    
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager    
    utility.execute()    
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute  
    self.fetch_command(subcommand).run_from_argv(self.argv)  
  File "/usr/local/lib/python 2.6/dist-packages/django/core/management/__init__.py", line 261, in fetch_command   
    klass = load_command_class(app_name, subcommand)    
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line   67, in load_command_class    
    module = import_module('%s.management.commands.%s' % (app_name, name))    
  File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in   import_module    
    __import__(name)    
  File "/usr/local/lib/python2.6/dist-packages/django/core/management/commands    /runserver.py", line 8, in <module>    
    from django.core.handlers.wsgi import WSGIHandler  
  File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 11, in <module>    
    from django.core import signals   
  File "/usr/local/lib/python2.6/dist-packages/django/core/signals.py", line 1, in <module>
    from django.dispatch import Signal   
  File "/usr/local/lib/python2.6/dist-packages/django/dispatch/__init__.py", line 9, in <module>    
    from django.dispatch.dispatcher import Signal, receiver    
ImportError: cannot import name receiver    

回答1:


To avoid problems like that in the future, use virtualenv




回答2:


This can happen if you have two versions installed. Delete django (/usr/local/lib/python2.6/dist-packages/django) Just delete the whole folder. Now reinstall Django 1.3 and it should work.



来源:https://stackoverflow.com/questions/4883802/problem-with-django-1-3-beta

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!