How can you have model declarations at two different directories in Django?
I have the model at the directory Code which contains "init.py", "models.py" and "admin.py". It is working properly alone.
I want to have the directory History which has the model of the revisions of the given questions. I have the similar files in the directory.
I need to tell Django to use the model at the directory "History" somehow, since I have a ManyToMany relation in the table Questions to the other directory.
I get the following import error
ImportError at /
cannot import name history
Request Method: GET
Request URL: http://127.0.0.1:8000/
Exception Type: ImportError
Exception Value:
cannot import name history
Exception Location: /home/noa/build/CML/../CML/codes/models.py in <module>, line 2
Python Executable: /usr/bin/python
Python Version: 2.6.2
Python Path: ['/home/noa/build/CML', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/var/lib/python-support/python2.6', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/var/lib/python-support/python2.6/gtk-2.0', '/var/lib/python-support/python2.6/pyinotify', '/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode', '/usr/local/lib/python2.6/dist-packages']
Server time: Fri, 11 Dec 2009 15:46:30 -0600