A public schema registry.
To run locally, you'll first need to install Python and pip.
To install project dependencies with pip, run pip install -r requirements.txt.
To access the database management portal, create a superuser for yourself with python3 manage.py createsuperuser.
To start the project, run python3 manage.py runserver.
During local development, emails will output to the console instead of actually sending.
We have JavaScript support for dynamic formsets as part of a form. For an example, see the "additional documentation" section of the schema management form.
- Create a
ulelement for the formset elements with the attributedata-formset-list-id="<Some list id>". - Render the formset's
empty_formsomewhere on the page inside an element with the attributedata-formset-template-for-id="<The list id>". - To use buttons to add and remove formset items to and from the formset, use the attribute
data-formset-append-to-list-id="<The list id>"on the append button anddata-formset-remove-from-list-id="<The list id>"on the remove button.
We use the CSS reset/normalizer from Tailwind named preflight.css which is fairly aggressive. Otherwise, all site styles are defined in site.css with global styles at the top and page styles at the bottom. We try to use BEM syntax where appropriate; for example, we have a .button class with modifiers like .button--prominent and .button--danger.
Frontend dev tools like ESLint are delivered via npm, which is included with Node.js. To use the tools locally, you'll need to:
- Install Node.js.
- Run
npm installwherever you cloned this repository to.
You can run the linter by executing npm run lint. If there are no issues, there won't be any output.
To get linting feedback in your code editor, check here to find an ESLint integration or instructions for your editor. The configuration file is named eslint.config.js, but your editor/plugin should find it for you.
You can format JavaScript and CSS files with npm run format.
To enable formatting from your code editor, check here for instructions for your editor. The configuration is in package.json, but your editor/plugin should find it for you.
You can check JavaScript types with npm run typecheck.
To get type checking feedback in your code editor, check here for instructions for your editor. The configuration file is named tsconfig.json, but your editor/plugin should find it for you.
Note that we only use TypeScript to type check our JavaScript files; we do not transpile from TypeScript to JavaScript. Don't try to write any TypeScript in this repository (except for declaration files like globals.d.ts). Check out the TypeScript JSDoc Reference to learn how to leverage types in JavaScript files.
When commiting relevant files with git, the following steps are performed:
- JavaScript files are linted, typechecked, and formatted. If issues are found, your commit will fail; please correct your issues and try again.
- README.md and CSS files are formatted.