Working model logic and views
This commit is contained in:
parent
a6441ffb63
commit
02bb53d84e
10 changed files with 224 additions and 89 deletions
|
|
@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/4.0/ref/settings/
|
|||
"""
|
||||
|
||||
from pathlib import Path
|
||||
from django.contrib.messages import constants
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
|
@ -23,10 +24,12 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||
SECRET_KEY = 'django-insecure-+m#ore4ojw1s_+yo+kutzpi^asg2dg9+f3+rf(hr#o)73ifo_1'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = [
|
||||
'localhost',
|
||||
'127.0.0.1'
|
||||
]
|
||||
|
||||
# Application definition
|
||||
|
||||
|
|
@ -56,7 +59,7 @@ ROOT_URLCONF = 'CollegiateHouseWars.urls'
|
|||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [],
|
||||
'DIRS': [BASE_DIR / 'templates'],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
|
|
@ -123,3 +126,10 @@ STATIC_URL = 'static/'
|
|||
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
|
||||
MESSAGE_TAGS = {constants.DEBUG: 'debug',
|
||||
constants.INFO: 'info',
|
||||
constants.SUCCESS: 'success',
|
||||
constants.WARNING: 'warning',
|
||||
constants.ERROR: 'danger', }
|
||||
|
|
|
|||
Reference in a new issue