Workin on views

This commit is contained in:
Salt 2025-01-18 23:41:53 -06:00
parent 25afd9c259
commit 5966c66997
3 changed files with 6 additions and 3 deletions

View File

@ -16,6 +16,7 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import include, path
from odyseescraper.views import OdyseeReleaseListView
urlpatterns = [
path('odysee/', include("odyseescraper.urls")),

View File

@ -4,5 +4,5 @@ from django.urls import path
from . import views
urlpatterns = [
path("", views.index, name="index"),
path("", views.OdyseeReleaseListView.as_view(), name="index"),
]

View File

@ -1,5 +1,7 @@
from django.views.generic import ListView
from django.shortcuts import render
from django.http import HttpResponse
from odyseescraper.models import OdyseeChannel, OdyseeRelease
def index(request):
return HttpResponse("Odysee index, content tbd")
class OdyseeReleaseListView(ListView):
model = OdyseeRelease