[Python-talk] Django tutorial issues.
kent37 at tds.net
Sat Jun 23 21:39:39 EDT 2007
Bill Freeman wrote:
> Has anyone gone through the django tutorial?
> How about on django 0.95 (0.95.1 being what's available via apt on ubuntu feisty
Django is pure python and easy as py to install from svn, if you want
bleeding edge, or from the tgz if you want 0.96. Just download/unpack
the files and run
python setup.py install
> It all works as advertised, even though I was reading the version of the tutorial
> for the subversion release, rather than for 0.95, until the very last stuff on
> the fourth and final page of the turorial, and even most of that is good. The
> url to pass to HttpResponseRedirect(), however, is an issue. The tutorial (even
> the 0.95 version of the tutorial, unless I mis-read it) is silent on fixing this
> up. reverse() can't deal with the missing results() view function as a basis for
> figuring out the url, and I can't blame it.
> If I hard the url as:
> '/polls/%d/results/' % p.id
> everything works. But that's putting an absolute path into the code, so it
> wouldn't "plug in" elsewhere without modification.
That is the url shown in the 0.96 and 0.95 tutorials section 4.
> It seems that the named pattern stuff (fourth member of the url dispatch tuple
> in */urls.py) is the ideal way to fix this, since the reverse() doc says that
> it can take one of those. But these aren't supported in 0.95, or even 0.96.
> They are new in the subversion release.
> I'm considering raising a ticket against the 0.95 (and maybe 0.96) version(s)
> of the tutorial, but I figured that I'd troll the sig first (I don't see a
> django mailing list on the django site), and embarrass myself among friends
I'm not sure what the issue is? The svn tutorial uses a feature not in
0.95 and doesn't work on 0.95, but the 0.95 tutorial seems to be written
without that feature.
There are a very active Google group and IRC channel for Django if you
want to embarass yourself in a larger venue ;)
gmane.comp.python.django.user on news.gmane.org
Listed on the "Community" page:
More information about the Python-talk