A management site for the Claremont MakerSpace
https://manage.claremontmakerspace.org/
Adam Goldsmith
62e48c6e6f
Instead of trying to do fiddly things with relative times, which turns out not to work very well. This will break if anyone changes the sid or timestamp of a transaction though (because of course MembershipWorks allows editing those). |
||
---|---|---|
.gitea/workflows | ||
cmsmanage | ||
dashboard | ||
doorcontrol | ||
js | ||
membershipworks | ||
paperwork | ||
rentals | ||
reservations | ||
static | ||
tasks | ||
templates | ||
.gitignore | ||
.pre-commit-config.yaml | ||
.prettierignore | ||
.prettierrc | ||
manage.py | ||
package.json | ||
pdm.lock | ||
pdm.toml | ||
pnpm-lock.yaml | ||
pyproject.toml | ||
README.md | ||
renovate.json | ||
tsconfig.json | ||
vite.config.js |
CMS Management
A management site for the Claremont MakerSpace
Development
This assumes a relatively recent Linux system. It should work fine on MacOS, and might work on Windows.
Python Setup
- Get Python 3.11 and PDM
- Run
pdm install
- Create
settings.dev.env
with config as required by ./cmsmanage/settings.py - Run
pdm run ./manage.py migrate
to create database tables- At present, this will require an annoying amount of manual
fiddling to create the
JSON_TABLE
views (due to MariaDB bugs) unless you run this as the root user for the database.
- At present, this will require an annoying amount of manual
fiddling to create the
- (Optional) If you have access to the production server, you can use real data:
pdm run ./manage.py dumpdata -o whatever.json
(on the server)pdm run ./manage.py loaddata whatever.json
(on your machine)
- Run
pdm run ./manage.py createsuperuser
to make a user
JavaScript setup
- Install NodeJS and pnpm
- Run
pnpm install
Running the dev server
- If you don't intend to work on the JavaScript code:
pnpm run build
to build the JS/CSSpdm run ./manage.py runserver
to start the Django server
- Otherwise:
pnpm run dev
to start the Vite dev serverDJANGO_VITE_DEV_MODE=true pdm run ./manage.py runserver
to start the Django server