Commit c1b9c128 authored by Mav's avatar Mav

Add Apps for Homepage, About, and Contact

parent 5f2017ab
File added
File added
File added
File added
File added
File added
File added
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'
File added
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
urlpatterns = [
path('', views.about, name = "about"),
]
\ No newline at end of file
from django.http import HttpResponse
# Create your views here.
def about(request):
return HttpResponse("Mav is a second year student taking computer science. He usually listens to pop music.")
\ No newline at end of file
File added
File added
File added
File added
File added
File added
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'
File added
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
urlpatterns = [
path('', views.contact, name = "contact"),
]
\ No newline at end of file
from django.http import HttpResponse
# Create your views here.
def contact(request):
return HttpResponse("Contact information: 0123-456-7890")
\ No newline at end of file
File added
File added
File added
File added
File added
File added
File added
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'
File added
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.urls import path
from . import views
urlpatterns = [
path('', views.homepage, name = "homepage"),
]
\ No newline at end of file
from django.http import HttpResponse
# Create your views here.
def homepage(request):
return HttpResponse("Welcome to Mav's Music Library!")
\ No newline at end of file
File added
File added
File added
File added
......@@ -31,6 +31,9 @@ ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'homepage.apps.HomepageConfig',
'about.apps.AboutConfig',
'contact.apps.ContactConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
......
......@@ -14,8 +14,11 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
urlpatterns = [
path('homepage/', include("homepage.urls")),
path('about/', include("about.urls")),
path('contact/', include("contact.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