Compare commits
No commits in common. "e7148362f0a7f058abc4e0185ced9f1e2c6e097d" and "57031fd688602cb184a571f3d1c22060a30a9a23" have entirely different histories.
e7148362f0
...
57031fd688
|
|
@ -1,16 +0,0 @@
|
|||
DJANGO_SECRET_KEY=''
|
||||
|
||||
DEBUG='True'
|
||||
ALLOWED_HOSTS=[]
|
||||
|
||||
DB_NAME=''
|
||||
DB_USER=''
|
||||
DB_PASSWORD=''
|
||||
DB_HOST='localhost'
|
||||
DB_PORT=5432
|
||||
|
||||
EMAIL_HOST=''
|
||||
EMAIL_PORT=
|
||||
EMAIL_USE_TLS='True'
|
||||
EMAIL_HOST_USER=''
|
||||
EMAIL_HOST_PASSWORD=''
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
For Cod sake do not use this project as is!
|
||||
===========================================
|
||||
|
||||
I'm making this public on the off chance someone, at an early stage of learning Django, comes across it and finds something useful in the code. This project is designed specifically for my needs and is not intended to be portable to other people without considerable restructuring effort. Besides this, my coding skills are basic to say the least and as soon as the learner viewing the project improves their knowledge they'll be able to work out all the many errors I've made.
|
||||
|
||||
I will decide on a license and add it in due course.
|
||||
|
||||
Calum.
|
||||
|
|
@ -9,26 +9,24 @@ https://docs.djangoproject.com/en/5.1/topics/settings/
|
|||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/5.1/ref/settings/
|
||||
"""
|
||||
import os
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = os.getenv('DJANGO_SECRET_KEY')
|
||||
SECRET_KEY = 'django-insecure-e7m1a6dwy1^-^zp^*_(ql^c8y5!^0$kf4jwarw^3ny5b(d^t1r'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = os.getenv('DEBUG')
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
ALLOWED_HOSTS = eval(os.getenv('ALLOWED_HOSTS'))
|
||||
|
||||
# Application definition
|
||||
|
||||
|
|
@ -56,7 +54,8 @@ ROOT_URLCONF = 'config.urls'
|
|||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [BASE_DIR / 'templates'],
|
||||
'DIRS': [BASE_DIR / 'templates']
|
||||
,
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
|
|
@ -71,20 +70,18 @@ TEMPLATES = [
|
|||
|
||||
WSGI_APPLICATION = 'config.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': os.getenv('DB_NAME'),
|
||||
'USER': os.getenv('DB_USER'),
|
||||
'PASSWORD': os.getenv('DB_PASSWORD'),
|
||||
'HOST': os.getenv('DB_HOST'),
|
||||
'PORT': os.getenv('DB_PORT'),
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
|
||||
|
||||
|
|
@ -103,10 +100,11 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/5.1/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en-gb'
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
|
|
@ -114,39 +112,11 @@ USE_I18N = True
|
|||
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/5.1/howto/static-files/
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
STATIC_ROOT = BASE_DIR / 'static/'
|
||||
MEDIA_URL = 'media/'
|
||||
MEDIA_ROOT = BASE_DIR / 'media/'
|
||||
|
||||
# User model and authentication
|
||||
# LOGIN_REDIRECT_URL = ''
|
||||
# LOGOUT_REDIRECT_URL = ''
|
||||
|
||||
# Email backend configuration
|
||||
# DEFAULT_FROM_EMAIL = 'calum@drulum.com'
|
||||
# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
# EMAIL_HOST = os.getenv('EMAIL_HOST')
|
||||
# EMAIL_PORT = os.getenv('EMAIL_PORT')
|
||||
# EMAIL_USE_TLS = (os.getenv('EMAIL_USE_TLS') == 'True')
|
||||
# EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER')
|
||||
# EMAIL_HOST_PASSWORD = os.getenv('EMAIL_HOST_PASSWORD')
|
||||
|
||||
# Tagulous config
|
||||
# SERIALIZATION_MODULES = {
|
||||
# 'xml': 'tagulous.serializers.xml_serializer',
|
||||
# 'json': 'tagulous.serializers.json',
|
||||
# 'python': 'tagulous.serializers.python',
|
||||
# 'yaml': 'tagulous.serializers.pyyaml',
|
||||
# }
|
||||
|
||||
# Markdownx config
|
||||
# MARKDOWNX_MARKDOWN_EXTENSIONS = [
|
||||
# 'markdown.extensions.extra',
|
||||
# ]
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
||||
|
|
|
|||
|
|
@ -5,6 +5,4 @@ description = "Add your description here"
|
|||
requires-python = ">=3.13"
|
||||
dependencies = [
|
||||
"django>=5.1.6",
|
||||
"psycopg>=3.2.4",
|
||||
"python-dotenv>=1.0.1",
|
||||
]
|
||||
|
|
|
|||
29
uv.lock
29
uv.lock
|
|
@ -30,37 +30,10 @@ version = "0.1.0"
|
|||
source = { virtual = "." }
|
||||
dependencies = [
|
||||
{ name = "django" },
|
||||
{ name = "psycopg" },
|
||||
{ name = "python-dotenv" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "django", specifier = ">=5.1.6" },
|
||||
{ name = "psycopg", specifier = ">=3.2.4" },
|
||||
{ name = "python-dotenv", specifier = ">=1.0.1" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "psycopg"
|
||||
version = "3.2.4"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "tzdata", marker = "sys_platform == 'win32'" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/e0/f2/954b1467b3e2ca5945b83b5e320268be1f4df486c3e8ffc90f4e4b707979/psycopg-3.2.4.tar.gz", hash = "sha256:f26f1346d6bf1ef5f5ef1714dd405c67fb365cfd1c6cea07de1792747b167b92", size = 156109 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/40/49/15114d5f7ee68983f4e1a24d47e75334568960352a07c6f0e796e912685d/psycopg-3.2.4-py3-none-any.whl", hash = "sha256:43665368ccd48180744cab26b74332f46b63b7e06e8ce0775547a3533883d381", size = 198716 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "python-dotenv"
|
||||
version = "1.0.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/bc/57/e84d88dfe0aec03b7a2d4327012c1627ab5f03652216c63d49846d7a6c58/python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca", size = 39115 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/6a/3e/b68c118422ec867fa7ab88444e1274aa40681c606d59ac27de5a5588f082/python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a", size = 19863 },
|
||||
]
|
||||
requires-dist = [{ name = "django", specifier = ">=5.1.6" }]
|
||||
|
||||
[[package]]
|
||||
name = "sqlparse"
|
||||
|
|
|
|||
Loading…
Reference in New Issue