Finished setting up the project by starting apps, modifying their urls.py...

Finished setting up the project by starting apps, modifying their urls.py files, and making migrations and testing runserver
parent fe846b6c
......@@ -3,7 +3,7 @@ CSCI 40 - E
Arpas, Matthew Karl David, P. - 210493
Cruz, Calvin Josh, G. - 211677
Gagalac, Albert, -
Lopez II, Michael, -
Lopez, Michael T. II – 213546
Oarde, Carlos Gabriel, -
Midterm Project: Widget v1
......
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class AnnouncementsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'announcements'
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 pageview
urlpatterns = [
path('', pageview, name='pageview')
]
app_name = "announcements"
\ No newline at end of file
from django.shortcuts import render
from django.http import HttpResponse
def pageview(request):
return HttpResponse()
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class AssignmentsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'assignments'
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 pageview
urlpatterns = [
path('', pageview, name='pageview')
]
app_name = "assignments"
\ No newline at end of file
from django.shortcuts import render
from django.http import HttpResponse
def pageview(request):
return HttpResponse()
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class DashboardConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'dashboard'
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 pageview
urlpatterns = [
path('', pageview, name='pageview')
]
app_name = "dashboard"
\ No newline at end of file
from django.shortcuts import render
from django.http import HttpResponse
def pageview(request):
return HttpResponse()
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class ForumConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'forum'
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 pageview
urlpatterns = [
path('', pageview, name='pageview')
]
app_name = "forum"
\ No newline at end of file
from django.shortcuts import render
from django.http import HttpResponse
def pageview(request):
return HttpResponse()
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class WidgetCalendarConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'widget_calendar'
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 pageview
urlpatterns = [
path('', pageview, name='pageview')
]
app_name = "widget_calendar"
\ No newline at end of file
from django.shortcuts import render
from django.http import HttpResponse
def pageview(request):
return HttpResponse()
import os
from pathlib import Path
from dotenv import load_dotenv
......@@ -19,6 +20,11 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'dashboard',
'announcements',
'forum',
'assignments',
'widget_calendar',
]
MIDDLEWARE = [
......
"""widget_quintupoltrobol URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
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 include, path
urlpatterns = [
path('dashboard/', include('dashboard.urls', namespace="dashboard")),
path('announcements/', include('announcements.urls', namespace="announcements")),
path('forum/', include('forum.urls', namespace="forum")),
path('assignments/', include('assignments.urls', namespace="assignments")),
path('widget_calendar/', include('widget_calendar.urls', namespace="widget_calendar")),
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