Table of Contents
This is the web application for the Djangonaut Space mentoring program. The platform is built with Django and Wagtail CMS. While it includes a Wagtail-based blog, the primary application is a Django system that manages:
- Recurring application and ranking processes for cohort selection
- Session management (cohorts/mentoring sessions) with participants, navigators, and captains
- Application workflows including surveys, review, scoring, and team formation
- Team formation and management with availability matching and project assignments
- Email notifications throughout the application and acceptance process
-
Clone the repo
git clone https://github.com/dawnwages/wagtail-indymeet.git
-
Have docker running and then run:
docker compose up
-
In a new terminal, run any setup commands you need such as
docker compose exec django uv run python manage.py createsuperuser -
Go to: http://127.0.0.1:8000/ and enjoy!
Backing up To create a fixture to share content with another person you should do the following:
docker compose exec django uv run python manage.py dumpdata --natural-foreign --indent 2 \
-e contenttypes -e auth.permission \
-e wagtailcore.groupcollectionpermission \
-e wagtailcore.grouppagepermission \
-e wagtailimages.rendition \
-e sessions \
-e admin \
-e wagtailsearch.indexentry \
-e accounts.userprofile \
-o fixtures/data.jsonThen make an archive/zip of your media/ and fixtures/ directories. This is because
the image files need to be copied alongside the data. If needed, you may want to delete
some images first before sharing.
Restoring
- Make a backup of your current media directory. This is so you can revert later on.
- Unpack the archived file, and place the
media/andfixtures/directories at the top level of the project. - Create a new database such as
docker compose exec db createdb -U djangonaut -W -O djangonaut djangonaut-space2 - Update
DATABASE_URLin.env.dockerto point to the new database docker compose exec django uv run python manage.py migratedocker compose exec django uv run python manage.py loaddata fixtures/data.json
There is a growing collection of documentation for the web application. At a minimum, it should contain the information for how to manage this application.
Information about the program can be found in the program repository.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Install pre-commit
pre-commit install - Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Tests can be written using Django's TestCase syntax
or using pytest.
To run the tests:
docker compose exec django uv run pytestThere are also Playwright tests that can be run. To run these tests:
# Be sure playwright is properly installed and has a test user for accessing /admin
docker compose exec django uv run playwright install --with-deps
# This is the actual test command
docker compose exec django uv run pytest -m playwright
# Run the tests in headed mode (so you can see the browser)
docker compose exec django uv run pytest -m playwright --headedBefore merging your changes from your branch you should rebase on the latest version
of develop. For example:
# Switch to develop and pull latest
git switch develop
git pull origin develop
# Rebase your feature branch on develop
git switch feature/AmazingFeature
git rebase develop
# Force push since the commit history will have changed
git push origin feature/AmazingFeature -f
#
# Wait for CI tests to pass!
#
# Merge to develop and push to GitHub
git switch develop
git merge feature/AmazingFeature
git push origin develop
# Clean up local branch
git branch -d feature/AmazingFeatureTo start a production deployment create a PR from develop to main (bookmark this link for quick creation of PRs). The PR should follow this format:
Title: "Production release - <summary>"
Description:
PRs:
- #1
- #2
This should be merged with a merge commit. Merging to main branch deploys to https://djangonaut.space.
Merging feature/AmazingFeature to develop deploys to https://staging.djangonaut.space/
main requires a linear commit history. This means if you make a change directly to main,
the develop branch must be rebased on main. Committing directly to main should only
occur in rare cases where a change must be pushed out to production immediately.
Running production or staging locally
- Set
DATABASE_URLin.env.dockerto the staging or production connection string. Credentials are in the password manager. docker compose up
Migrate production or staging db
- Set
DATABASE_URLin.env.dockerto the staging or production connection string. Credentials are in the password manager. docker compose exec django uv run python manage.py migrate
This project uses uv to manage dependencies.
To add a new dependency:
# Add to main dependencies
docker compose exec django uv add package-name
# Add to dev dependencies
docker compose exec django uv add --group dev package-name
# Add to test dependencies
docker compose exec django uv add --group test package-nameTo update dependencies:
# Update all dependencies
docker compose exec django uv lock --upgrade
# Update a specific package
docker compose exec django uv lock --upgrade-package package-nameDistributed under the MIT License. See LICENSE.txt for more information.