created the about app which displays a personal introduction and details on my music preference

parent addb46ce
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.
# <appname>/urls.py
from django.urls import path
from .views import index
urlpatterns = [
path('', index, name='index'),
]
# This might be needed, depending on your Django version
app_name = "about"
\ No newline at end of file
from django.http import HttpResponse
def index(request):
return HttpResponse(
"""Hi! My name is Addy.
I love spending my alone time by watching sitcoms and movies.
Going on spontaneous adventures also excites me a lot.
As for my music taste, it really depends on my mood.
However, I really love listening to R&B and Pop most of the time :D.""")
......@@ -42,7 +42,9 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'homepage'
'homepage',
'about',
'contact'
]
MIDDLEWARE = [
......
......@@ -18,5 +18,7 @@ from django.urls import include, path
urlpatterns = [
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),
]
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.
# <appname>/urls.py
from django.urls import path
from .views import index
urlpatterns = [
path('', index, name='index'),
]
# This might be needed, depending on your Django version
app_name = "contact"
\ No newline at end of file
from django.http import HttpResponse
def index(request):
return HttpResponse('Contact Details:\n Mary Adelaide A. Salto\n 0912 345 6789\n 55 C-3 Road, Golden Village, Quezon City')
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