views:

173

answers:

1

Howdy

Im still fairly new to Django, so please explain things with that in mind.

I'm trying to create three websites using 2 subdomains and 1 domain:
for the blog, blog.mysite.com
for the forums, forums.mysite.com
for the custom web app, mysite.com

When building the custom web app, I used contrib.auth to make use of the built-in django provided user models and functionality.

For the forums, I am planning on using SNAPboard (http:// code.google.com/p/snapboard/) with minimal, if any, modifications. On initial inspection, it looks like it also uses contrib.auth users.

For the blog, I will probably be rolling my own lightweight blogging app (since that seems to be the Django way and, also, b/c as Bennet mentions, there is no killer Django Blog app)

Currently, I am considering two features that require some integration between the three sites. First, I want to have the users of the custom web app to use the same account to also log into the forums. Second, I also (but I haven't figured out how I'm going to do this yet) would like my blog posts to automatically become a topic for discussion in the forums (this is just an idea I had, I might end up dropping it).

Ok, so to my questions:

1) Again, I'm new to Django, but this integration leads me to believe the three websites need to be all under one project. Is this correct?

2) How would I accomplish the url structure for the websites that I described above (blog.mysite.com, etc)? In the project's urls.py, I don't know how to filter off of subdomains. If it was mysite.com/ forums/, that would be easy, but I don't know how to to catch forums.mysite.com and forward it to the appropriate Django app.

3) Would I have to make use of the django.contrib.sites framework? I don't understand that framework fully, but it seems like it's used when two different websites are using the same django app in the background. Whereas my three websites are all using different django apps, but I want them to share a little bit of data.

Thanks for your help.

A: 

1) Yes, it's only true way for that 2) Use middleware 3) No, you don't need it.

maga
I read the link you posted and I didn't see how I would use it. Did I miss something? Or were you simply saying that I should find / write some other middleware to accomplish what I want?
cadwag
ofcoz you should write ur own middleware to detect domain/subdomains and give them their own urls list (urls.py)
maga