Add empty feeds app
This commit is contained in:
parent
b112b69f52
commit
c971117e67
8 changed files with 35 additions and 1 deletions
|
|
@ -140,6 +140,7 @@ INSTALLED_APPS: list[str] = [
|
||||||
"django.contrib.staticfiles",
|
"django.contrib.staticfiles",
|
||||||
"django.contrib.postgres",
|
"django.contrib.postgres",
|
||||||
# Internal apps
|
# Internal apps
|
||||||
|
"feeds.apps.FeedsConfig",
|
||||||
# Third-party apps
|
# Third-party apps
|
||||||
"django_celery_results",
|
"django_celery_results",
|
||||||
"django_celery_beat",
|
"django_celery_beat",
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ if TYPE_CHECKING:
|
||||||
from django.urls.resolvers import URLResolver
|
from django.urls.resolvers import URLResolver
|
||||||
|
|
||||||
urlpatterns: list[URLPattern | URLResolver] = [
|
urlpatterns: list[URLPattern | URLResolver] = [
|
||||||
path(route="silk/", view=include("silk.urls", namespace="silk")),
|
path("", include("feeds.urls")),
|
||||||
]
|
]
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|
|
||||||
0
feeds/__init__.py
Normal file
0
feeds/__init__.py
Normal file
7
feeds/apps.py
Normal file
7
feeds/apps.py
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class FeedsConfig(AppConfig):
|
||||||
|
"""Configuration for the feeds app."""
|
||||||
|
|
||||||
|
name = "feeds"
|
||||||
0
feeds/migrations/__init__.py
Normal file
0
feeds/migrations/__init__.py
Normal file
0
feeds/models.py
Normal file
0
feeds/models.py
Normal file
26
feeds/urls.py
Normal file
26
feeds/urls.py
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
from django.http import HttpResponse
|
||||||
|
from django.urls import path
|
||||||
|
|
||||||
|
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"),
|
||||||
|
]
|
||||||
0
feeds/views.py
Normal file
0
feeds/views.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue