[oauth] Adding oauth pattern
This commit is contained in:
2032
poetry.lock
generated
2032
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -46,7 +46,8 @@ django-imagekit = "^5.0.0"
|
|||||||
thefuzz = "^0.22.1"
|
thefuzz = "^0.22.1"
|
||||||
dataclass-wizard = "0.22.0"
|
dataclass-wizard = "0.22.0"
|
||||||
webdavclient3 = "^3.14.6"
|
webdavclient3 = "^3.14.6"
|
||||||
boto3 = "^1.35.14"
|
boto3 = "^1.35.37"
|
||||||
|
django-oauth-toolkit = "^3.0.1"
|
||||||
|
|
||||||
[tool.poetry.group.dev]
|
[tool.poetry.group.dev]
|
||||||
optional = true
|
optional = true
|
||||||
|
|||||||
@ -112,6 +112,7 @@ INSTALLED_APPS = [
|
|||||||
"storages",
|
"storages",
|
||||||
"taggit",
|
"taggit",
|
||||||
"rest_framework.authtoken",
|
"rest_framework.authtoken",
|
||||||
|
"oauth2_provider",
|
||||||
"encrypted_field",
|
"encrypted_field",
|
||||||
"profiles",
|
"profiles",
|
||||||
"scrobbles",
|
"scrobbles",
|
||||||
|
|||||||
@ -1,27 +1,23 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import include, path
|
from django.urls import include, path
|
||||||
|
from oauth2_provider import urls as oauth2_urls
|
||||||
from rest_framework import routers
|
from rest_framework import routers
|
||||||
|
|
||||||
import vrobbler.apps.scrobbles.views as scrobbles_views
|
import vrobbler.apps.scrobbles.views as scrobbles_views
|
||||||
from vrobbler.apps.books.api.views import AuthorViewSet, BookViewSet
|
|
||||||
from vrobbler.apps.music import urls as music_urls
|
|
||||||
from vrobbler.apps.books import urls as book_urls
|
|
||||||
from vrobbler.apps.bricksets import urls as bricksets_urls
|
|
||||||
from vrobbler.apps.sports import urls as sports_urls
|
|
||||||
from vrobbler.apps.podcasts import urls as podcast_urls
|
|
||||||
from vrobbler.apps.videogames import urls as videogame_urls
|
|
||||||
from vrobbler.apps.boardgames import urls as boardgame_urls
|
from vrobbler.apps.boardgames import urls as boardgame_urls
|
||||||
from vrobbler.apps.locations import urls as locations_urls
|
from vrobbler.apps.books import urls as book_urls
|
||||||
|
from vrobbler.apps.books.api.views import AuthorViewSet, BookViewSet
|
||||||
|
from vrobbler.apps.bricksets import urls as bricksets_urls
|
||||||
from vrobbler.apps.lifeevents import urls as lifeevents_urls
|
from vrobbler.apps.lifeevents import urls as lifeevents_urls
|
||||||
from vrobbler.apps.tasks import urls as tasks_urls
|
from vrobbler.apps.locations import urls as locations_urls
|
||||||
from vrobbler.apps.trails import urls as trails_urls
|
|
||||||
from vrobbler.apps.webpages import urls as webpages_urls
|
|
||||||
from vrobbler.apps.moods import urls as moods_urls
|
from vrobbler.apps.moods import urls as moods_urls
|
||||||
|
from vrobbler.apps.music import urls as music_urls
|
||||||
from vrobbler.apps.music.api.views import (
|
from vrobbler.apps.music.api.views import (
|
||||||
AlbumViewSet,
|
AlbumViewSet,
|
||||||
ArtistViewSet,
|
ArtistViewSet,
|
||||||
TrackViewSet,
|
TrackViewSet,
|
||||||
)
|
)
|
||||||
|
from vrobbler.apps.podcasts import urls as podcast_urls
|
||||||
from vrobbler.apps.profiles.api.views import UserProfileViewSet, UserViewSet
|
from vrobbler.apps.profiles.api.views import UserProfileViewSet, UserViewSet
|
||||||
from vrobbler.apps.scrobbles import urls as scrobble_urls
|
from vrobbler.apps.scrobbles import urls as scrobble_urls
|
||||||
from vrobbler.apps.scrobbles.api.views import (
|
from vrobbler.apps.scrobbles.api.views import (
|
||||||
@ -30,6 +26,7 @@ from vrobbler.apps.scrobbles.api.views import (
|
|||||||
LastFmImportViewSet,
|
LastFmImportViewSet,
|
||||||
ScrobbleViewSet,
|
ScrobbleViewSet,
|
||||||
)
|
)
|
||||||
|
from vrobbler.apps.sports import urls as sports_urls
|
||||||
from vrobbler.apps.sports.api.views import (
|
from vrobbler.apps.sports.api.views import (
|
||||||
LeagueViewSet,
|
LeagueViewSet,
|
||||||
PlayerViewSet,
|
PlayerViewSet,
|
||||||
@ -38,8 +35,12 @@ from vrobbler.apps.sports.api.views import (
|
|||||||
SportViewSet,
|
SportViewSet,
|
||||||
TeamViewSet,
|
TeamViewSet,
|
||||||
)
|
)
|
||||||
|
from vrobbler.apps.tasks import urls as tasks_urls
|
||||||
|
from vrobbler.apps.trails import urls as trails_urls
|
||||||
|
from vrobbler.apps.videogames import urls as videogame_urls
|
||||||
from vrobbler.apps.videos import urls as video_urls
|
from vrobbler.apps.videos import urls as video_urls
|
||||||
from vrobbler.apps.videos.api.views import SeriesViewSet, VideoViewSet
|
from vrobbler.apps.videos.api.views import SeriesViewSet, VideoViewSet
|
||||||
|
from vrobbler.apps.webpages import urls as webpages_urls
|
||||||
|
|
||||||
router = routers.DefaultRouter()
|
router = routers.DefaultRouter()
|
||||||
router.register(r"scrobbles", ScrobbleViewSet)
|
router.register(r"scrobbles", ScrobbleViewSet)
|
||||||
@ -67,6 +68,7 @@ urlpatterns = [
|
|||||||
path("api/v1/auth", include("rest_framework.urls")),
|
path("api/v1/auth", include("rest_framework.urls")),
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("accounts/", include("allauth.urls")),
|
path("accounts/", include("allauth.urls")),
|
||||||
|
path("o/", include(oauth2_urls)),
|
||||||
path("", include(music_urls, namespace="music")),
|
path("", include(music_urls, namespace="music")),
|
||||||
path("", include(book_urls, namespace="books")),
|
path("", include(book_urls, namespace="books")),
|
||||||
path("", include(video_urls, namespace="videos")),
|
path("", include(video_urls, namespace="videos")),
|
||||||
|
|||||||
Reference in New Issue
Block a user