Skip to content

ImportError: cannot import name 'url' from 'django.conf.urls' on Django 4.0 #34

Open
@FriedrichFroebel

Description

@FriedrichFroebel

I discovered your project today while researching some stuff and tried to include it into my project. This failed as Django 4.0 removed the django.conf.urls.url method which had been deprecated in Django 3.0.

For this reason I am currently using a workaround in my urls.py file:

from django.urls import path, include
from searchableselect.views import filter_models as searchable_select_filter_models

urlpatterns = [
    # Original solution does not work for Django 4.0.
    # path("searchableselect/", include("searchableselect.urls")),
    path(
        "searchable-select/",
        searchable_select_filter_models,
        name="searchable-select-filter",
    ),
]

As far as I have seen, the other functionality seems to work with Django 4.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions