Update the development notes in the README
This commit is contained in:
parent
ac7e3312c5
commit
e006a6eb50
27
README.md
27
README.md
@ -4,12 +4,33 @@ A management site for the [Claremont MakerSpace](https://claremontmakerspace.org
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
1. Get Python 3.9 and [PDM](https://pdm.fming.dev/)
|
This assumes a relatively recent Linux system.
|
||||||
|
It should work fine on MacOS, and might work on Windows.
|
||||||
|
|
||||||
|
### Python Setup
|
||||||
|
|
||||||
|
1. Get Python 3.11 and [PDM](https://pdm.fming.dev/)
|
||||||
2. Run `pdm install`
|
2. Run `pdm install`
|
||||||
3. Copy `./cmsmanage/settings/dev.sample.py` to `./cmsmanage/settings/dev.py`
|
3. Create `settings.dev.env` with config as required by [./cmsmanage/settings.py](`./cmsmanage/settings.py`)
|
||||||
4. Run `pdm run ./manage.py migrate` to create database tables
|
4. 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.
|
||||||
5. (Optional) If you have access to the production server, you can use real data:
|
5. (Optional) If you have access to the production server, you can use real data:
|
||||||
1. `pdm run ./manage.py dumpdata -o whatever.json` (on the server)
|
1. `pdm run ./manage.py dumpdata -o whatever.json` (on the server)
|
||||||
2. `pdm run ./manage.py loaddata whatever.json` (on your machine)
|
2. `pdm run ./manage.py loaddata whatever.json` (on your machine)
|
||||||
6. Run `pdm run ./manage.py createsuperuser` to make a user
|
6. Run `pdm run ./manage.py createsuperuser` to make a user
|
||||||
7. Run `pdm run ./manage.py runserver` to start the server
|
|
||||||
|
### JavaScript setup
|
||||||
|
|
||||||
|
1. Install NodeJS and [pnpm](https://pnpm.io/installation)
|
||||||
|
2. 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/CSS
|
||||||
|
- `pdm run ./manage.py runserver` to start the Django server
|
||||||
|
- Otherwise:
|
||||||
|
- `pnpm run dev` to start the Vite dev server
|
||||||
|
- `DJANGO_VITE_DEV_MODE=true pdm run ./manage.py runserver` to start the Django server
|
||||||
|
Loading…
Reference in New Issue
Block a user