It all started as a celebration of the Django birthday, inspiring the creation of a Django-themed map to track Python and Django events globally. The project aims to foster connection and engagement across the Django community.
By combining geospatial technology with community participation, Django Birthday Map empowers developers and enthusiasts to:
- Find and add events near them,
- Contribute to the growing map of Django happenings,
- Celebrate the global spirit of collaboration and learning.
- Docker & Docker Compose Prefer the latest version.
- just
- If you are having any issues with the
justfile, you can copy the commands directly from the file and run them in the project's root directory.
- If you are having any issues with the
If you don't have Docker, skip to the next section for all the details!
cp .env_template .envjust buildjust -- manage migratejust manage loaddata events/fixtures/events.jsonjust -- manage createsuperuserjust upAfter this, you can access the project on the following URLs in your browser:
- Python 3.13
- uv
- System libraries:
libgdal-dev,gdal-bin(Geospatial libraries)libpq5(PostgreSQL client library)
Install system libraries on Debian/Ubuntu with:
sudo apt install libgdal-dev gdal-bin libpq5- If this is your first time using PostgreSQL, you may also need:
sudo apt install postgresql postgresql-contrib postgresql-client-common postgresql-client- Install PostGIS extension:
postgis
sudo apt install postgis- Clone the project code
- Install the project dependencies
- Set all required environment variables
- Create a spatial database and add PostgreSQL PostGIS extension
- Add PostgreSQL PostGIS extension for testing setup (optional)
- Apply database migrations
- Load initial events data fixture
- Create a superuser to log in to the platform
- Run the server
- The application will be running in DEBUG mode, at the URL: http://localhost:8000
- Run Tests (optional)
Clone the project locally:
git clone git@github.com:Mitchina/django_birthday_map.git
cd django_birthday_mapInstall dependencies and activate the virtual environment:
uv sync
source .venv/bin/activateMore info:
- https://pypi.org/project/GDAL/
- https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html
- https://docs.djangoproject.com/en/5.2/ref/contrib/gis/install/postgis/
Copy the example environment file:
$ cp .env_template .envEdit .env to set your database credentials and other settings.
Create the database and enable PostGIS extension:
sudo -u postgres createdb django_birthday_map
sudo -u postgres psql django_birthday_map
CREATE EXTENSION postgis;The database user must be a superuser in order to run
CREATE EXTENSION postgis;.
Create a database user and grant privileges:
CREATE USER geodjango WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE django_birthday_map TO geodjango;
ALTER DATABASE django_birthday_map OWNER TO geodjango;
ALTER ROLE geodjango WITH CREATEDB;Exit the shell:
\qSee Django PostGIS installation docs for details.
To run tests involving PostGIS, enable PostGIS in the template database:
sudo -u postgres psql -d template1 -c "CREATE EXTENSION IF NOT EXISTS postgis;"Apply migrations:
python manage.py migrateLoad initial events fixture:
python manage.py loaddata events/fixtures/events.jsonCreate a superuser for admin access:
python manage.py createsuperuserStart the development server:
python manage.py runserverThe application runs in DEBUG mode at http://localhost:8000.
You can run the test suite with:
pytest