diff --git a/posts/urls.py b/posts/urls.py new file mode 100644 index 0000000..1c6117e --- /dev/null +++ b/posts/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.index, name = 'index') +] \ No newline at end of file diff --git a/posts/views.py b/posts/views.py index 91ea44a..13d9a94 100644 --- a/posts/views.py +++ b/posts/views.py @@ -1,3 +1,5 @@ from django.shortcuts import render +from django.http import HttpResponse -# Create your views here. +def index(request): + return HttpResponse("Index der Seite Posts Applikation") diff --git a/webengdjango/urls.py b/webengdjango/urls.py index 0a213a5..bc9e76c 100644 --- a/webengdjango/urls.py +++ b/webengdjango/urls.py @@ -14,8 +14,9 @@ Including another URLconf 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.urls import path +from django.urls import path, include urlpatterns = [ + path('posts/', include('posts.urls')), path('admin/', admin.site.urls), ]