Commit bc7c778b by Patryk Czarnik

Django - hello world

parent ed4460e5
from django.http import HttpResponse
from django.shortcuts import render from django.shortcuts import render
# Create your views here. # Create your views here.
def hello(request):
return HttpResponse('Hello <strong style="color:red">Django</strong>!')
...@@ -37,6 +37,7 @@ INSTALLED_APPS = [ ...@@ -37,6 +37,7 @@ INSTALLED_APPS = [
"django.contrib.sessions", "django.contrib.sessions",
"django.contrib.messages", "django.contrib.messages",
"django.contrib.staticfiles", "django.contrib.staticfiles",
"aplikacja",
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
...@@ -16,7 +16,9 @@ Including another URLconf ...@@ -16,7 +16,9 @@ Including another URLconf
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import path
from aplikacja.views import hello
urlpatterns = [ urlpatterns = [
path("admin/", admin.site.urls), path("admin/", admin.site.urls),
path("hello", hello),
] ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment