revy
revy

Reputation: 667

URL parameters with GET request in django

guys. I'm passing parameters via GET requests to my view. But it seems that django is not properly handling my URL.

With parameters longer than one char, it works, but if I use a single char, I get Page not found (404) error.

Example:

Works: http://localhost:8000/my_url/test

Not found: http://localhost:8000/my_url/t

urls.py code fragment:

url(r'^my_url/(?P<username>\w.+)/$', views.my_url, name='my_url'),

Is there any django restriction to the length of parameters passed via GET? Thanks a lot in advance!

Upvotes: 0

Views: 233

Answers (1)

devxplorer
devxplorer

Reputation: 637

Remove dot from regex string r'^my_url/(?P<username>\w+)/$'

Upvotes: 2

Related Questions