Add homepage, about, and contact apps

parent ef6d0cae
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class AboutConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'about'
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 = "about"
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse("Hi! I am squinky! I like cute and evil shitba music!")
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"
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse("If you would like to contact me, you can send an email to thisisanemail@gmail.com! My mobile number is 012345678910.")
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class HomepageConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'homepage'
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 = "homepage"
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse("Welcome to Joaqs' Music Library!")
...@@ -41,6 +41,9 @@ INSTALLED_APPS = [ ...@@ -41,6 +41,9 @@ INSTALLED_APPS = [
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'lab01app', 'lab01app',
'homepage',
'about',
'contact',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
...@@ -18,5 +18,8 @@ from django.urls import include, path ...@@ -18,5 +18,8 @@ from django.urls import include, path
urlpatterns = [ urlpatterns = [
path('lab01app/', include('lab01app.urls', namespace="lab01app")), path('lab01app/', include('lab01app.urls', namespace="lab01app")),
path('homepage/', include('homepage.urls', namespace="homepage")),
path('about/', include('about.urls', namespace="about")),
path('contact/', include('contact.urls', namespace="contact")),
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
] ]
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