Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Multiple sites
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
James Bennett  
View profile  
 More options Jan 27 2008, 11:45 pm
From: "James Bennett" <ubernost...@gmail.com>
Date: Sun, 27 Jan 2008 22:45:56 -0600
Local: Sun, Jan 27 2008 11:45 pm
Subject: Re: Multiple sites
A better solution:

1. Completely forget that you ever learned from any source that it
might be a good idea to have a project folder with the apps inside it;
the tutorial does that because it's simpler and easier for purposes of
introducing Django, but in real-world situations it's generally a
terrible idea. Refactor the applications so that they can happily
exist on their own as top-level modules directly on your Python path,
and change your import statements to reflect this.

2. Read the documentation on the sites framework and add relations
from your models to the Site model, and have your views retrieve only
those objects related to the Site object currently being served:
http://www.djangoproject.com/documentation/sites/

3. Set up a second settings file, and optionally a second URLConf if
you want a different URL structure, and optionally set up the
ADMIN_FOR setting so you can share a single instance of the Django
admin between sites.

4. Enjoy.

--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google