> 1. I need basecamp-esque URLS i.e.  [instance].maindomain.com where
> [instance] is an "instance" of the application.  I've looked at the
> sites feature for this but I'm not 100% sure it's suitable with
> constraint (2) below.  Is there any (optionally anecdotal) evidence
> either way to suggest that it will handle this?

Yes, Django can/does handle this.

There's a modest write-up here:
http://www.rossp.org/blog/2007/apr/28/using-subdomains-django/

This could be expanded to a middleware that attaches the hostname 
(or subdomain name) to the request object; or it could be 
implemented as a decorator that attaches itself to germane view 
functions and then mungs the call-signature or request object 
before handing it off to the actual view.

> 2. Separate authentication for each instance.  I'm not sure the user
> auth stuff built into Django can do this on a per instance basis as it
> lacks a ForeignKey against Site.  Is this easy to hack in before I go
> doing it or is there a more django-way of doing it?

I'm not sure on this one.  Depending on the scope of any cookies 
used, it may come for free, or you may have to do a little twiddling.

> 3. Project / application structure.  Should the "instance" code be an
> application or a separate project?

The concept of a "project" is actually a bit of a crutch.  It's 
nice for getting up to speed quickly, but it does promote writing 
non-portable code.  James gives a good rant^Wargument here:

http://www.b-list.org/weblog/2007/nov/09/projects/

for why the idea of a project should be dumped in favor of more 
portable apps.

It sounds like a single app can do all you need.  If it got 
large, apps should usually split along functional/conceptual 
boundaries, not along data boundaries.

My $0.02

-tim






--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to