I created a new project with django-admin.py as such:
django-admin.py startproject foo
Under the folder foo it gives me the basic files:
__init__.py
manage.py
settings.py
urls.py
I then created a new folder under foo named apps and added a blank
__init__.py. Within the apps folder I created a new app with django-
admin.py instead of manage.py:
django-admin.py startapp bar
This gives me the basic files within bar like models.py. I also
created a new managers.py file within this same bar directory:
__init__.py
managers.py
models.py
tests.py
views.py
In my foo/bar/models.py file, I need to import a class from
managers.py. I have tried "from bar.managers import PublicManger"
which gives me an ImportError stating no module is named bar.managers.
However, when I import with "from foo.apps.bar.managers" it works.
How do I decouple the project name within my apps so I may distribute
the source code?
--
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.