jazzband / django-rest-knox

Authentication Module for django rest auth
MIT License
1.1k stars 206 forks source link

Doc Question: Where is 'urls(r'api/auth/', include('knox.urls'))'? #328

Closed PunkFleet closed 5 months ago

PunkFleet commented 5 months ago

https://jazzband.github.io/django-rest-knox/urls/#urls-knoxurls I following doc for install knox, but i don't know which package of urls

image
luqmansen commented 5 months ago

Is it in here? https://github.com/luqmansen/django-rest-knox/blob/17e4a5cc1d74113b77b3b2a295afa50b320d65aa/knox_project/urls.py#L1-L8

giovannicimolin commented 5 months ago

@Birddle Ah, I think I know what you mean: are you confused about where the urls method is coming from? On newer django versions use the include method, like this:

from django.urls import include

urlpatterns = [
    ....
    # Knox URLs
    path("auth/", include("knox.urls")),
]

Reference:

Note: if you have some time, can you contribute this small update to the documentation?