On Tuesday 20 June 2017 18:08:02 James Schneider wrote:
> > And his problem is that it does *not* match. Not that it does.
>
> And for that I think my statement still stands that Django is
> stripping the last portion of the URL as a GET argument. I'm betting
> that
> requests.GET.get('abc') will return '12/' per the last example from
> the OP.
Yes, but for the first problem, r'^blank/.*$' should match blank/abc and generates a 404. I think the matching isn't the problem and the 404 is caused either by ordering issue in urlpatterns (first match wins, no others are tried) or with the view itself (get_object_or_404).
You are correct that urlpatterns are only matched against request.path. This excludes the query string.
--
Melvyn Sopacua
No comments:
Post a Comment