On Thu, 2008-01-03 at 16:07 -0800, LRP wrote:
> Ah, Django promises much, but so far has delivered nothing but Mal de
> Mar. Please tell me that there is smoother sailing beyond this patch
> of troubled waters.
> 
> 1) Picked as my nautical chart The Django Book... Must be
> authoritative, right?
> 

Should be a pretty good choice.  I haven't received my copy yet, though,
so I can't say for sure.

> 2) We've barely cast moorings and into Chapter 2 when The Book tells
> me to pick a database. Fine. I have an affinity for Postgres. Tells me
> to find and install pyscopg. OK, I find it, try to install it
> according to instructions. Get mysterious error message. Double check
> all my work. No help. Post problem to this fine forum. No response.
> 
> Now that's nervous making. On two counts.
> 

Subtract one count for the helpful reply you received from Karen Tracey
on Wed, 2 Jan 2008 at 07:35:38 -0500.  Subtract the other count, because
the seaworthiness of your DB installation ought not to reflect on the
fine developers of Django.

If you didn't see the reply, maybe your spam blocker trapped it.  But
you can check the google group if you like:
http://groups.google.com/group/django-users/

> 3) Ah, the clouds part! Further digging leads me to discover that
> pyscopg is available as python-psycopq2 in the Debian etch
> repository.  Excellent! Aptitude loads it up in a jiffy and the sea is
> calm again!
> 
> Why didn't The Book steer me right to begin with?
> 

Did you tell the book you were running Debian Etch?  Maybe it thought
you were on Windows. ;)

> 4) I create a project. Launch the built-in web server. Success! See
> the friendly blue banner. Feeling good.
> 
Yay!

> 5) But... We sail on to Chapter 3. Create the view
> current_datetime(request) in views.py. Done. and map the view to the
> URL in urls.py as follows:
> 
> urlpatterns = patterns(",
>     (r'^time/$' , current_datetime),
> )
> 
> I follow the instructions meticulously.  Double-check the code. Enter
> the URL...
> 
> Shipwreck!
> 
> 6) I get the error message 'function' object has no attribute 'rindex'
> Exception location: /var/lib/python-support/python2.4/django/core/
> resolvers.py in get_mod_func, line 23
> 
> Who ordered up this "rindex?"
> 

Clearly, django/core/resolvers.py ordered up this rindex. :)  Your URL
pattern passes in the function current_datetime, while the urls.py file
calls for a string naming a function.  (rindex is a method of string
objects).  Try changing current_datetime to 'current_datetime', and make
sure the first argument to patterns is two single quotes, rather than
one double quote, as it appears above.  (or two double quotes.  It
doesn't really matter.)

> Am I expected to flounder around in the bowls of django to make this
> tub seaworthy? This newbie is beginning to feel like Django may not be
> all that seaworthy. Or maybe the chart has steered me wrong? Or could
> it be my novice seamanship? Whatever. We're barely out of harbor and
> the good ship is leaking like a sieve.
> 

Nope.  Just ask when you get stuck.  Folks are pretty friendly.

> And so, I put this note in a bottle and cast it to the waves. Please
> tell me how I can caulk the leaky seams, continue afloat, and earn my
> sea legs.
> 
> And please reassure me that it's worth it.
> 

It's worth it.  A couple error messages in getting the configuration
right are most assuredly worth it.

> Many thanks,
> 
> Lloyd
> 
> 

No trouble at all.  I'm fairly new to Django myself, so don't assume my
advice is authoritative either, but hopefully it'll point you in the
right direction.  If it doesn't, come on back, and ask again.

Cheers,
Cliff



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to