1👍
✅
Anything that matches (?P<poll>\w+d+)
will be matched first by (?P<url>\w+)
, so the site_daily_means
view will run.
You could fix this by changing the url pattern for pollutant_daily_means
, e.g. to:
url(r'^api/daily-means/poll/(?P<poll>\w+d+)/', views.pollutant_daily_means.as_view()),
Note that \w+\d+
is probably unnecessary in this case. You could simplify it to \w+
since you already filter DailyMean
on the poll
field.
Source:stackexchange.com