On 23/08/2011 3:29pm, raj wrote:
I am editing my user model, and I want to place a foreign key to a
class in another model, that is in a different app. How would I go
about importing it?

Tree:
/project/myapp/model1.py
/project/myapp2/model2.py

can i simply just say:
from myapp2 import model2
The easy way to figure this out is to do it then start a Python interpreter and say "import myapp.model1"

The fact is it depends on your python path and the existence of __init__.py files. Testing the import will show you the situation.

Regards

Mike
or do I need to edit something in the settings?
Thank you.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to