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 Beginner a bit lost - need some pointers please

Received: by 10.224.193.134 with SMTP id du6mr1916936qab.12.1317846991220;
        Wed, 05 Oct 2011 13:36:31 -0700 (PDT)
X-BeenThere: django-users@googlegroups.com
Received: by 10.224.175.67 with SMTP id w3ls2328328qaz.6.gmail; Wed, 05 Oct
 2011 13:36:01 -0700 (PDT)
Received: by 10.224.107.193 with SMTP id c1mr1939879qap.11.1317846961883;
        Wed, 05 Oct 2011 13:36:01 -0700 (PDT)
Received: by 10.224.107.193 with SMTP id c1mr1939878qap.11.1317846961874;
        Wed, 05 Oct 2011 13:36:01 -0700 (PDT)
Return-Path: <tphern...@gmail.com>
Received: from mail-vx0-f173.google.com (mail-vx0-f173.google.com [209.85.220.173])
        by gmr-mx.google.com with ESMTPS id j6si1449391qct.1.2011.10.05.13.36.01
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 05 Oct 2011 13:36:01 -0700 (PDT)
Received-SPF: pass (google.com: domain of tphern...@gmail.com designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of tphern...@gmail.com designates 209.85.220.173 as permitted sender) smtp.mail=tphern...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by mail-vx0-f173.google.com with SMTP id fl10so2496120vcb.18
        for <django-users@googlegroups.com>; Wed, 05 Oct 2011 13:36:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=references:in-reply-to:mime-version:content-type:message-id
         :content-transfer-encoding:from:subject:date:to:x-mailer;
        bh=Js/JE2AbcPNPcCWU2h7VrIPsx1hr4l2yHPAx4hnPoME=;
        b=h+E+N2PyyJetJEuq5/CXgf2WAgth6wa/lrL7d8r1H2T6g+DVaa6bbQZmDEla6XD11p
         7P31NnhFBrT+a67UfB541W2Ew5HVsDICzPbCKwfTagG/CWx4Zl1kF171psHpfPQb4Tps
         92Ll+VjTatozo8y9ElIzMmU4bZFb3sQtMY7Ck=
Received: by 10.52.108.165 with SMTP id hl5mr2975171vdb.159.1317846961723;
        Wed, 05 Oct 2011 13:36:01 -0700 (PDT)
Return-Path: <tphern...@gmail.com>
Received: from [140.163.137.66] (mskresolve-6.mskcc.org. [140.163.254.131])
        by mx.google.com with ESMTPS id bp4sm2883561vdc.0.2011.10.05.13.36.00
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 05 Oct 2011 13:36:00 -0700 (PDT)
References: <20111005195533.GA16170@chris>
In-Reply-To: <20111005195533.GA16170@chris>
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
Message-Id: <42D54155-E58E-437D-A42F-8B23D57FC...@gmail.com>
Content-Transfer-Encoding: quoted-printable
From: Peter Herndon <tphern...@gmail.com>
Subject: Re: Beginner a bit lost - need some pointers please
Date: Wed, 5 Oct 2011 16:35:49 -0400
To: django-users@googlegroups.com
X-Mailer: Apple Mail (2.1084)


On Oct 5, 2011, at 3:55 PM, Chris G wrote:
>=20
> However two rather basic things still elude me:-
>=20
>    Where/how do I actually start creating the top level/page of a web
>    site?   Do I just open vi and create some HTML and embed django
>    code?  That seems unlikely but I can't see anywhere that tells me
>    what the code that creates a django site looks like and/or where it
>    resides.   An actual example of a two or three page working django
>    based web site would be a huge help.

I've seen a few different patterns in regards to this question. One =
scenario is where you have a multi-purpose Django site comprised of =
multiple reusable apps with no obvious top-level entry point, you can =
create a view "def index(request)", and have it render a template with =
whatever data you want to send it -- including perhaps no data at all. =
Then map your index view to '/' in urls.py at the project level, put =
together a template and you're all set.

Another option I've seen is if you have a single-purpose site where one =
app is primary, you map your primary app's start page as your index. An =
example would be a blog, and you would set up your chronological entries =
list page as the index.


>=20
>    I can't see anywhere that seems to tell me the issues involved with
>    moving from using the built in web server to using apache2 (or
>    whatever, I have apache2 on my system).

The short version is that the built-in server was built as a =
just-good-enough-to-use-while-developing solution, and is not sufficient =
to handle more than a minimal load. The trade-off is that configuring =
apache2 + mod_wsgi, or nginx + gunicorn, is more complex than just =
running the devserver.

Hope this helps a bit,

---Peter Herndon