Commit 7791c8ae authored by Ysobel Vera's avatar Ysobel Vera

Made the contact app and fixed previous issue

Made the content for the contact app. This time I figured out how to display different apps so the code works now.
parent f101d294
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class ContactConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'contact'
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.urls import path
from .views import index
urlpatterns = [
path('', index, name='index'),
]
app_name = 'contact'
\ No newline at end of file
from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse('If you ever want to chat, here are my contact details!' +
'Phone Number: 09XX XXX XXXX, Facebook: Yso Vera, Twitter: sleepysobi')
......@@ -44,6 +44,7 @@ INSTALLED_APPS = [
'django.contrib.staticfiles',
'homepage',
'about',
'contact',
]
MIDDLEWARE = [
......
......@@ -18,6 +18,7 @@ from django.urls import include, path
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('homepage.urls', namespace='homepage')),
path('', include('about.urls', namespace='about')),
path('homepage/', include('homepage.urls', namespace='homepage')),
path('about/', include('about.urls', namespace='about')),
path('contact/', include('contact.urls', namespace='contact')),
]
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