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

But even that is a bit ambiguous as to the treatment of underscores.
Naturally, I'm wanting to use a slug to identify some model instances
based on some other model field.  But it's not being entered via the
Admin model, so I can't do the prepopulated_fileds[] trick either.

Second question:

Is there a standard clean_user_input() that accepts direct user
input from a form text field and de-gunks it so that it is later
acceptable to be re-emitted as HTML formatted data without worry
of hacking issues?  I am looking form something more clever than
simply validating the user's input to conform to "is a number" or
"is a text field" sorts of thing.  I'm specifically looking for a
function that strips out embedded scripting, SQL, HTML, etc hackery.
Sure, I'd then like to use it to verify clean form input of course.

Thanks,
jdl

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

Reply via email to