On Tue, Mar 22, 2011 at 4:49 PM, Matt Robenolt
<youdontevenk...@gmail.com> wrote:
> Why not just do an import for your custom settings?
>
> try:
>        from site_settings import *
> except ImportError:
>        pass

No particularly compelling reason that I know of, the import machinery
is just unnecessary in this case.  The site_settings.py is viewed as
an extension of the settings.py, so it doesn't need to be loaded as a
module in its own right.  And for the same reason we know exactly
where we expect the file to be, so there's no need to consult
sys.path.

I suppose it just comes down to a matter of taste.

Cheers,
Ian

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

Reply via email to