[Answered ]-Django urls, different regex?

2👍

✅

Only the path part of the URL is matched against the urlpattern. The query string is available in the view thru request.GET

0👍

In the Django url-config, there is no need to match the Query String in the url. You can query the query string data like request.GET.get('query_string_key').

For example:

request.GET.get("page")

In the urls.py you can write the following:

urlpatterns = patterns('',
    url(r'^ajax/status/(?P<type>[-\w]+)/(?P<id>[-\d]+)/$', 'ping.views.ajx_status', name='ajx_status'),
)

Leave a comment