Browse Source

änderung2

undefined
khaloufam70043 4 years ago
parent
commit
05331c7bb2
3 changed files with 12 additions and 2 deletions
  1. 2
    1
      news/urls.py
  2. 6
    0
      posts/urls.py
  3. 4
    1
      posts/views.py

+ 2
- 1
news/urls.py View File

@@ -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),
]

+ 6
- 0
posts/urls.py View File

@@ -0,0 +1,6 @@
from django.urls import path
from . import views

urlpatterns = [
path('', views.index, name='index')
]

+ 4
- 1
posts/views.py View File

@@ -1,3 +1,6 @@
from django.shortcuts import render
from django.http import HttpResponse

# Create your views here.

def index(request):
return HttpResponse("Index-Seite der Polls-Applikation")

Loading…
Cancel
Save