Commit c6f281bb authored by AllenSkyy's avatar AllenSkyy

Added homepage file

parent a1bf7429
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('', homepage, name='homepage'),
]
app_name = 'homepage'
\ No newline at end of file
from django.shortcuts import render
from django.http import HttpResponse
def homepage(request):
return HttResponse('Welcome to Widget!')
...@@ -43,6 +43,7 @@ INSTALLED_APPS = [ ...@@ -43,6 +43,7 @@ INSTALLED_APPS = [
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'assignments', 'assignments',
'announcements', 'announcements',
'homepage',
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
...@@ -20,4 +20,5 @@ urlpatterns = [ ...@@ -20,4 +20,5 @@ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('assignments/', include('assignments.urls')), path('assignments/', include('assignments.urls')),
path('announcements/', include('announcements.urls')) path('announcements/', include('announcements.urls'))
path('homepage/', include('homepage.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