DemSchoolTools is a database that excels at managing Judicial Committee records for Sudbury-inspired schools. In addition, it does a satisfactory job of tracking people (students, parents, donors, and others), student attendance, and the management manual.
See the wiki for more information.
-
Download and install Oracle JDK version 11.x. Set the JAVA_HOME environment variable to be the location that you installed it, meaning that $JAVA_HOME/bin/java (or $JAVA_HOME/bin/java.exe on Windows) should be the path to the java binary.
-
Install sbt 1.x. If you use a Mac, I recommend using homebrew to install it.
-
Download and install PostgreSQL. If you use a Mac, I recommend installing the "Postgres" app instead.
-
Download and install Node v22. If you use Mac or Linux or Windows WSL, I recommend using nvm to download and install it instead of the Node website.
-
Download the source code, or clone the git repository.
cdinto the root level of the source code. -
Run
npm installto install the Javascript libraries. -
Start the PostgreSQL server and create a database named "school_crm". You'll also need to set the password for the user named "postgres" to "123", or change the database username and password in conf/base.conf and django/demschooltools/settings.py.
-
Install uv. Once you run it, you'll need to close your terminal window and reopen it before continuing.
-
Run:
cd django uv run manage.py migrate uv run manage.py setup_initial_data cd ..If you see errors when running
manage.py migrate, read below for troubleshooting info.
You'll need to run two separate programs for each of the parts of the site.
Run ./sbt.sh, then execute the eclipse and run command in the sbt console:
[DemSchoolTools] $ eclipse
[info] About to create Eclipse project files for your project(s).
[info] Successfully created Eclipse project files for project(s):
[info] DemSchoolTools
[info] authLibrary
[info] modelsLibrary
[DemSchoolTools] $ run
Run:
cd django
uv run honcho start
Once you have all two servers running, you can:
-
Navigate to http://localhost:9000 in your browser and wait while DemSchoolTools is compiled.
-
Login with Email
admin@asdf.comand passwordnopassword.
If you first set up your local development environment before November 2025, you will see this error when you run uv run manage.py migrate:
django.db.migrations.exceptions.InconsistentMigrationHistory:
Migration admin.0001_initial is applied before its
dependency dst.0001_initial on database 'default'.
If you're willing to discard your local data, then the easiest way to fix this is to delete your entire school_crm database and start fresh with the migrate and setup_initial_data installation step above. If you want to keep your data, read on.
-
Apply all Play schema changes that existed before they were deleted and replaced with Django ones.
Run
git fetch; git checkout cadf15b7, then run the Play server as described in "1 of 2" above, go to http://localhost:9000 and click "Apply this script now.".Then quit Play and sbt.
-
Tell Django that the initial Django migrations have already been applied.
Connect to the school_crm database and run this SQL statement:
INSERT INTO django_migrations(app, name, applied) VALUES ('dst', '0001_initial', clock_timestamp()), ('custodia', '0003_swipe_person_swipe_day_empty_out_unique', clock_timestamp());
-
That's it! You can go back to whatever branch you were working on before.
uv run manage.py migrateshould now work properly.