Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Imports in the tutorial

Received: by 10.151.19.38 with SMTP id w38mr1091603ybi.28.1276274306317;
        Fri, 11 Jun 2010 09:38:26 -0700 (PDT)
X-BeenThere: django-developers@googlegroups.com
Received: by 10.150.242.38 with SMTP id p38ls5150259ybh.6.p; Fri, 11 Jun 2010 
	09:38:18 -0700 (PDT)
Received: by 10.150.252.4 with SMTP id z4mr1094230ybh.25.1276274298841;
        Fri, 11 Jun 2010 09:38:18 -0700 (PDT)
Received: by 10.150.252.4 with SMTP id z4mr1094228ybh.25.1276274298520;
        Fri, 11 Jun 2010 09:38:18 -0700 (PDT)
Return-Path: <freakboy3...@gmail.com>
Received: from mail-gy0-f180.google.com (mail-gy0-f180.google.com [209.85.160.180])
        by gmr-mx.google.com with ESMTP id v5si1628756ybk.5.2010.06.11.09.38.17;
        Fri, 11 Jun 2010 09:38:17 -0700 (PDT)
Received-SPF: pass (google.com: domain of freakboy3...@gmail.com designates 209.85.160.180 as permitted sender) client-ip=209.85.160.180;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of freakboy3...@gmail.com designates 209.85.160.180 as permitted sender) smtp.mail=freakboy3...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by mail-gy0-f180.google.com with SMTP id 13so1040888gyg.39
        for <django-developers@googlegroups.com>; Fri, 11 Jun 2010 09:38:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:sender:received
         :in-reply-to:references:date:x-google-sender-auth:message-id:subject
         :from:to:content-type;
        bh=eAoKAU0tCKDDuVKkI6h7TDGQGilhPXVRd7AihG2FF3w=;
        b=fI0wLSRergZiPQvRnPcYWSh3V7h3BmNymRma+MoqgwqZyYxM402e2H71f1uVNuCJif
         rzfXLahSV/78o54i0oba9ynXb052sPFFAvBwivOU+sqBSpCqFeKRh3/oIPYXSXdE2yWh
         vBo0aDNV1lRA+iUH0gVO3l7L5yqyPy3m38EYE=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:sender:in-reply-to:references:date
         :x-google-sender-auth:message-id:subject:from:to:content-type;
        b=rUQnxIAb/XSFGEeSf3Yo6vwGH5rIJM3gAiUzrflEAvL+m2foOZFq61HmFwmuFHso3e
         BmoUiWdAoAwbsgN9dCXMJpIF4Bn7RNK9xpKDaydVtyRUsAZCSlanZULLHlZUWMJEU+/A
         xUPdpRHqSu2ST+U6Iouxr40KOSP0v6rwjZFIY=
MIME-Version: 1.0
Received: by 10.91.132.4 with SMTP id j4mr2431939agn.202.1276274296372; Fri, 
	11 Jun 2010 09:38:16 -0700 (PDT)
Sender: freakboy3...@gmail.com
Received: by 10.231.143.77 with HTTP; Fri, 11 Jun 2010 09:38:15 -0700 (PDT)
In-Reply-To: <4C111F2E.9020...@aeracode.org>
References: <4C111F2E.9020...@aeracode.org>
Date: Sat, 12 Jun 2010 00:38:15 +0800
Message-ID: <AANLkTilvy9beQ-YJfFHHsOk97LcX8jm_35SxewM7A...@mail.gmail.com>
Subject: Re: Imports in the tutorial
From: Russell Keith-Magee <russ...@keith-magee.com>
To: django-developers@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Jun 11, 2010 at 1:21 AM, Andrew Godwin <and...@aeracode.org> wrote:
> Hi all,
>
> I noticed today that the tutorial still does imports like "from
> mysite.polls.models import Poll", and URLs like "(r'^polls/$',
> 'mysite.polls.views.index')".

It also says "coming soon" at the end of tutorial 4. It has said that
for a while now :-)

You're not missing anything specific -- it's really just a matter of
time. Good documentation take time to write; doubly so for good
tutorials.

The issue you raise - that the current tutorial is exclusively "app
inside project" has been raised as a ticket more times than I care to
count. I would certainly welcome anybody that wants to fix it so that
it never gets raised again :-)

It's not as simple as just rewriting the existing 4 steps of the
tutorial, though. As Peter points out, there is a legitimate use case
for "project-specific apps" -- as a way of namespacing apps that truly
are project specific.

Where the current tutorial fails is that it doesn't take the next step
by and demonstrate how (and when) an app can (or should) be broken out
from the project structure. The simple step of making the 'poll' a
truly reusable app, and explaining why this is a good idea, would be a
great tutorial 5 IMHO. Part of this tutorial may be to point out
exactly how unnecessary the 'project' directory really is in the
purist sense -- at the end of the day, all you really need is a
settings file and a bunch of apps in your PYTHONPATH.

Yours,
Russ Magee %-)