Hi everyone,

Forgive me if this is a stupid question, but here goes: I have started
my first Django project, and in it I have an object called
"Categories" defined in my models.  In my urls.py, I have a rule that
matches http://mysite.com/category/<my category>, and everything up to
here is fine.  However, category names can sometimes be made up of two
words, for instance "Web Development", and that's how they get
inserted in the DB, with whitespace.  So when I pass that in my URL
(links to http://mysite.com/category/<my category> are built
automatically by Django in the app), I only get http://mysite.com/category/Web
sent in the request.  I could cut the whitespace or replace with an
underscore, but then of course it won't match what is recorded in the
DB.

So, what is the correct way to deal with whitespace and Django URLs?
--~--~---------~--~----~------------~-------~--~----~
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