Hi,
+------------------------------------------------------------------------------------------------------------
+
Does anyone know why the project-name included in the import
statement?
+------------------------------------------------------------------------------------------------------------
+
One thing I cannot understand in Django is the <project name> included
in the import statement.
For example from djangoproject admin document:
from django.contrib import admin
from myproject.myapp.models import Author
class AuthorAdmin(admin.ModelAdmin):
pass
admin.site.register(Author, AuthorAdmin)
to me the command "from myproject.myapp.models import Author" should
be
either
from myapp.models import Author
or
from models import Author # in the same folder as myapp.models.
My view is project-name is a container, applications inside the
container deal with other applications in the container or defined in
the PYTHONPATH.
2nd if you would like to share the application with other project;
then definitely the application should not refer to any project name
-- an application can refer to other applications, but it should not
refer to an application of other project which i might not have the
right to access to it, but only the application.
Does anyone know why the project-name included in the import
statement?
Thanks in advance.
tak
--
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.