Add a README and sample development settings file

This commit is contained in:
Adam Goldsmith 2022-02-15 22:58:28 -05:00
parent 187e958b60
commit 83c97197a7
2 changed files with 40 additions and 0 deletions

15
README.md Normal file
View File

@ -0,0 +1,15 @@
# CMS Management
A management site for the [Claremont MakerSpace](https://claremontmakerspace.org)
## Development
1. Get Python 3.9 and [PDM](https://pdm.fming.dev/)
2. Run `pdm install`
3. Copy `./cmsmanage/settings/dev.sample.py` to `./cmsmanage/settings/dev.py`
4. Run `pdm ./manage.py migrate` to create database tables
5. (Optional) If you have access to the production server, you can use real data:
1. `pdm ./manage.py dumpdata -o whatever.json` (on the server)
2. `pdm ./manage.py loaddata whatever.json` (on your machine)
6. Run `pdm ./manage.py createsuperuser` to make a user
7. Run `pdm ./manage.py runserver` to start the server

View File

@ -0,0 +1,25 @@
from .dev_base import *
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "+>+4?MO:*@`KFF?($O}F+<dI/oE'/8V?s%d?fpL5_UF_703}*0&g04BFPqkl&`Tz"
EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend"
EMAIL_FILE_PATH = "./email-messages" # change this to a proper location
# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "default",
},
# Currently a separate database, for historical reasons
"membershipworks": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "membershipworks",
},
}