Commit 6ca53f17 authored by Julliana Zarah C. Cruz's avatar Julliana Zarah C. Cruz

added an announcement board

parents 8edafba4 e7d88b79
SECRET_KEY= os.getenv('SECRET_KEY') SECRET_KEY= 'django-insecure-%sref4cve4o0bsht4u_if@gg#%872m_br-es$bvnp#n$g936i7'
STATIC_ROOT='<folder path of where static items>' STATIC_ROOT='<folder path of where static items>'
\ No newline at end of file
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 assignments
urlpatterns = [
path('', assignments, name='assignments')
]
app_name = 'assignments'
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def assignments(request):
return HttpResponse("This is the Assignments page!")
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 index
urlpatterns = [
path('', index, name='index')
]
app_name='forum'
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
def index(request):
return HttpResponse('This is the forum! This is where people talk')
...@@ -12,8 +12,9 @@ https://docs.djangoproject.com/en/4.0/ref/settings/ ...@@ -12,8 +12,9 @@ https://docs.djangoproject.com/en/4.0/ref/settings/
from pathlib import Path from pathlib import Path
from dotenv import load_dotenv from dotenv import load_dotenv
import os
load_dotenv load_dotenv()
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
...@@ -22,14 +23,14 @@ BASE_DIR = Path(__file__).resolve().parent.parent ...@@ -22,14 +23,14 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret! # SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-%sref4cve4o0bsht4u_if@gg#%872m_br-es$bvnp#n$g936i7' SECRET_KEY = os.getenv('SECRET_KEY')
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
ALLOWED_HOSTS = [] ALLOWED_HOSTS = []
# Comment mine
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
...@@ -40,7 +41,12 @@ INSTALLED_APPS = [ ...@@ -40,7 +41,12 @@ INSTALLED_APPS = [
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'homepage', 'homepage',
<<<<<<< HEAD
'announcements', 'announcements',
=======
'forum',
'assignments',
>>>>>>> e7d88b79ac7d8be26bb5115ccf9a5361ce1e38bf
] ]
MIDDLEWARE = [ MIDDLEWARE = [
......
...@@ -18,6 +18,12 @@ from django.urls import include, path ...@@ -18,6 +18,12 @@ from django.urls import include, path
urlpatterns = [ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
<<<<<<< HEAD
path('homepage/', include('homepage.urls', namespace="homepage")), path('homepage/', include('homepage.urls', namespace="homepage")),
path('announcements/', include('announcements.urls', namespace = "announcements")), path('announcements/', include('announcements.urls', namespace = "announcements")),
=======
path('forum/',include('forum.urls',namespace="forum")),
path('homepage/', include('homepage.urls', namespace="homepage")),
path('assignments/', include('assignments.urls', namespace="assignments")),
>>>>>>> e7d88b79ac7d8be26bb5115ccf9a5361ce1e38bf
] ]
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