On Sun, Jul 26, 2009 at 9:13 PM, Vitaly Babiy <vbabi...@gmail.com> wrote:
> How does one go about registering a namespace? Not quite sure what you mean by that, but my guess is that you are assuming you need to register your namespace (modules?) before being able to import them. If this is what you are asking, you don't. The import dot notation is simply the directory structure, optionally followed by the file, optionally followed by the object within the file. It will use the PythonPath list variable to try to find the namespaces you are referring to. This includes directories in python and your project. For example, in my urls.py I have: from django.contrib import admin urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root) This could also be written as: from django.contrib.admin.site import root urlpatterns = patterns('', (r'^admin/(.*)', root) This (roughly) represents: C:\python25\Lib\site-packages\django\contrib\admin\site.py (function root()) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---