Browse Source

Praktikum 2 fertig

master
Lukas Weber 3 years ago
parent
commit
1f2e1e448b
3 changed files with 11 additions and 2 deletions
  1. 6
    0
      posts/urls.py
  2. 3
    1
      posts/views.py
  3. 2
    1
      webengdjango/urls.py

+ 6
- 0
posts/urls.py View File

from django.urls import path
from . import views

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

+ 3
- 1
posts/views.py View File

from django.shortcuts import render from django.shortcuts import render
from django.http import HttpResponse


# Create your views here.
def index(request):
return HttpResponse("Index der Seite Posts Applikation")

+ 2
- 1
webengdjango/urls.py View File

2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path
from django.urls import path, include


urlpatterns = [ urlpatterns = [
path('posts/', include('posts.urls')),
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
] ]

Loading…
Cancel
Save