Re: Problem with views and urls

2010-02-23 Thread Jon Loeliger
> Hello, > > I'm having a problem with views and url's. If I have a url called > "people" that has a callback to "index" works fine, but if I add a > url for parameters, let's say "people//" it does call the > index function, instead of the defined one. If I change it, for > example to

Re: Slugify() and Clean form data Questions

2010-02-22 Thread Jon Loeliger
> > Hope this better answers your question, > Matt Matt, Indeed it does. Thank you! I guess a bit of the frustrating part of learning Django here is stumbling across the sites that explain how to do various tidbits of functionality, and then slide in some variant [*1*] of "But one would never

Re: Slugify() and Clean form data Questions

2010-02-22 Thread Jon Loeliger
> > Is there a reason why you can't use Form.is_valid()? It's pretty nice. > > http://docs.djangoproject.com/en/dev/ref/forms/api/#accessing-clean-data > > Example: > http://gist.github.com/311192 I get is_valid() and the notion of cleaned data. I *think*, though, that I am asking for

Re: Slugify() and Clean form data Questions

2010-02-20 Thread Jon Loeliger
> Folks, A few days ago I asked: > Is there a canonical definition or even a reference > implementation of a slug = slugify(str) function somewhere? Thanks for taking the time to answer that for me! We pretty much beat the answer into my thick skull: Use the slugify() function as per "from

Re: Slugify() and Clean form data Questions

2010-02-18 Thread Jon Loeliger
> > from django.template.defaultfilters import slugify > > Every filter you see listed in > http://docs.djangoproject.com/en/dev/ref/templates/builtins/ lives in > django.template.defaultfilters. Awesome! Thanks! And with that in hand, the only place I can find the string

Re: Slugify() and Clean form data Questions

2010-02-18 Thread Jon Loeliger
> Some places say underscores are valid, others say they removed: > > http://docs.djangoproject.com/en/dev/ref/templates/builtins/ > > slugify > > Converts to lowercase, removes non-word characters > (alphanumerics and underscores) and converts spaces to > hyphens.

Re: Slugify() and Clean form data Questions

2010-02-18 Thread Jon Loeliger
> > > Is there a canonical definition or even a reference implementation > > of a slug =3D slugify(str) function somewhere? Yeah, I could go > > grep through the sources and maybe find one? And yes, I see: > >=20 > >http://docs.djangoproject.com/en/dev/ref/models/fields/#slugfield > >=20 >

Slugify() and Clean form data Questions

2010-02-18 Thread Jon Loeliger
Folks, Quick question or two: Is there a canonical definition or even a reference implementation of a slug = slugify(str) function somewhere? Yeah, I could go grep through the sources and maybe find one? And yes, I see: http://docs.djangoproject.com/en/dev/ref/models/fields/#slugfield

AJAX Autocompletion Field

2010-02-13 Thread Jon Loeliger
Folks, For likely the umpteenth time, can someone recommend a good AJAX auto completion tutorial or example that I might use to crib-together a text-field selection that would otherwise be a very large drop-down selection field? My use case would be essentially like having a table full of say,

Re: Getting uploaded images to show

2010-02-13 Thread Jon Loeliger
> 2010/2/13 holger : > > I am new to django and I am trying to get an image upload to work. > > > > My media url is > > MEDIA_URL =3D 'http://127.0.0.1:8000/media/' > > > > and my media_root is > > MEDIA_ROOT =3D os.path.join(PROJECT_ROOT, 'media') > > > > where

State of the Django MPTT Art?

2010-02-10 Thread Jon Loeliger
Folks, I'd like to add a few MPTT manged data-sets to my projects so I am wondering what the current state of the MPTT art is. I'm using Danjgo 1.1.1 right now, and would like to slap down an MPTT manager in my project that is BSD-ish licensed, allows multiple, different sets of nodes, and

[ANSWER] Re: Template and Form Question

2010-02-10 Thread Jon Loeliger
> Folks, > > I would appreciate some help figuring out how to create a > templated form scenario. The quick form of the question is > either: > > How do I iterate over two form field list simultaneously > in my template using {% for f in form %}, sort of like > {% for f,g in

Template and Form Question

2010-02-05 Thread Jon Loeliger
Folks, I would appreciate some help figuring out how to create a templated form scenario. The quick form of the question is either: How do I iterate over two form field list simultaneously in my template using {% for f in form %}, sort of like {% for f,g in form1,form2 %}? or