Malcolm Tredinnick wrote:

> Since the first part of the URL mapping tuple is a Python regular
> expression, you can experiment at the command line. Import the "re"
> module and use the regular expression you are trying to get working to
> match against the sorts of URLs you are going to be sending in.
> Something like:
>
>         >>> import re
>         >>> p = 
> re.compile(r'^portfolio/(?P<category_slug>[-\w]+)/(?P<project_slug>[-\w]+)$')
>         >>> s = 'portfolio/foo/blah/'
>         >>> m = p.match(s)
>
> At this point, m will either be None (it did not match) or a reg-exp
> match object (see the Python docs for the re module for details) that
> you can poke about at to see what made it into various keyword
> arguments, etc.
>
> The fact that you are seeing a 404 means that the regular expression is
> not picking up your URLs, so you need to start there.
>
> Regards,
> Malcolm

The command line your talking about, is it the shell?

I've tried python manage.py shell and the code you wrote. But nothing
happends when I type them in. No errors either. Do I need to replace
'portfolio/foo/blah/' with a "real" url ? Or is it another command line
than the shell? 

Thank you for your help!

Best Regards,
Tomas


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to