Add initial version of feeds app
All checks were successful
Deploy to Server / deploy (push) Successful in 11s
All checks were successful
Deploy to Server / deploy (push) Successful in 11s
This commit is contained in:
parent
e889b58aec
commit
a02b5d5f66
17 changed files with 993 additions and 15 deletions
|
|
@ -1,26 +1,15 @@
|
|||
from typing import TYPE_CHECKING
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from django.http import HttpRequest
|
||||
from django.urls import URLPattern
|
||||
from django.urls import URLResolver
|
||||
|
||||
|
||||
def index(request: HttpRequest) -> HttpResponse:
|
||||
"""View for the index page.
|
||||
|
||||
Args:
|
||||
request: The HTTP request object.
|
||||
|
||||
Returns:
|
||||
HttpResponse: A simple HTTP response with a greeting message.
|
||||
"""
|
||||
return HttpResponse("Hello, world!")
|
||||
|
||||
|
||||
urlpatterns: list[URLPattern | URLResolver] = [
|
||||
path("", index, name="index"),
|
||||
path("", views.feed_list, name="feed-list"),
|
||||
path("feeds/<int:feed_id>/", views.feed_detail, name="feed-detail"),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue