I am new to django. I have version 1.3.1 installed.
I have created two projects: projectone and projecttwo using django-admin.py
And in projectone I have an app called blog created using python manage.py startapp
In projecttwo setings.py file when put the following in installed_apps:
INSTALLED_APPS = (
other code goes here...
'projectone.blog'
)
And then when I run projecttwo using manage.py I get:
Error: No module named projectone.blog
I have __ init __.py files placed correctly.
I just cannot figure out why. Maybe because projectone is not in pythonpath? Is that what django-admin.py does? and not doing it on mine for some reason? I am not sure.
Look at what manage.py does:
https://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-py-and-manage-py
It dynamically adds your apps to the python path when you use it – i.e. when you are using runserver during development.
You have two separate projects so when you run either one you will only have the apps from that particular project on the python path. To use an app from one project ‘outside’, you need to manually add these apps to your global python path if you want to use them outside of the current project