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')
>
>
>
> What did you base this on? Certainly not the python docs or behavior of
> any pcre based library.
>
> Regular expressions are capitalist: greedy by default.
>
> The qualifiers *? are there especially to make a match non-greedy.
>
>
>
> Quick test:
>
> pcregrep -o '^.*:' /etc/passwd
>
>
>
>
On Monday 19 June 2017 16:43:12 James Schneider wrote:
> But if I use the pattern:
>
> *urlpatterns = [ *
> *url(r'^blank/.*$', views.BlankMore, name='blankMore'),*
> *]*
>
> I can enter:
>
> localhost:8000/uA/blank/
>
> and the pattern will match, but if I enter:
>
>
But if I use the pattern:
*urlpatterns = [ *
*url(r'^blank/.*$', views.BlankMore, name='blankMore'),*
*]*
I can enter:
localhost:8000/uA/blank/
and the pattern will match, but if I enter:
localhost:8000/uA/blank/abc
I get an error message: "Page not found (404)"
I could be
I'm trying to write a simple Django app and I have encountered a few
problems handling URL patterns. Any help will be appricated.
Problem 1
My first problem is that I would like to parse a url that is known up until
the last part of the URL. So for example, if I use the following
5 matches
Mail list logo