steveagi commited on
Commit
e6722dc
·
unverified ·
2 Parent(s): f5b4054 6e08fcd

Merge pull request #16 from east-and-west-magic/helloworld

Browse files
src/helloworld/views.py CHANGED
@@ -1,3 +1,6 @@
1
  from django.shortcuts import render
 
2
 
3
  # Create your views here.
 
 
 
1
  from django.shortcuts import render
2
+ from django.http import HttpResponse
3
 
4
  # Create your views here.
5
+ def helloworld(request):
6
+ return HttpResponse("<h1>Hello World!</h1>")
src/pgsns/settings.py CHANGED
@@ -37,6 +37,7 @@ INSTALLED_APPS = [
37
  'django.contrib.sessions',
38
  'django.contrib.messages',
39
  'django.contrib.staticfiles',
 
40
  ]
41
 
42
  MIDDLEWARE = [
 
37
  'django.contrib.sessions',
38
  'django.contrib.messages',
39
  'django.contrib.staticfiles',
40
+ 'helloworld',
41
  ]
42
 
43
  MIDDLEWARE = [
src/pgsns/urls.py CHANGED
@@ -16,7 +16,8 @@ Including another URLconf
16
  """
17
  from django.contrib import admin
18
  from django.urls import path
19
-
20
  urlpatterns = [
21
  path('admin/', admin.site.urls),
 
22
  ]
 
16
  """
17
  from django.contrib import admin
18
  from django.urls import path
19
+ from helloworld import views
20
  urlpatterns = [
21
  path('admin/', admin.site.urls),
22
+ path('helloworld/', views.helloworld, name="helloworld")
23
  ]