'Django allauth urls produce 404

So I'm trying to add all auth to existing DjangoCMS project and ran into this kinda weird issue. I added urls like this:

urlpatterns += i18n_patterns(
    url(r'^admin/', admin.site.urls),  # NOQA
    url(r'^', include('cms.urls')),
    path('account/', include('allauth.urls')),  # <-- here )

But when I go to any url, say mydomain.com/en/account/login/ I get 404. In debug mode Django lists all sorts of patterns it tried to match, and among them - en/ account/ login/ [name='account_login'], concluding with

"The current path, /en/account/login/, didn't match any of these."

Moreover if I add {% url 'account_login' %} to a template, it works just fine, producing a link to mydomain.com/en/account/login/ which is still a 404 error. I have no idea where to even start debugging this :( Any suggestions?

Edit:



Solution 1:[1]

Replace the url with path:

urlpatterns += i18n_patterns[
    path(r'^admin/', admin.site.urls),  # NOQA
    path(r'^', include('cms.urls')),
    path('account/', include('allauth.urls')),  # <-- here 
]

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 to the bone