GitHub - Mitchina/django_birthday_map · GitHub
Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Repository files navigation

Django Birthday Map

A collaborative platform that maps and showcases Django-related events happening worldwide.

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.

Table of Contents

Quickstart: Docker

Prerequisites

  • 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 don't have Docker, skip to the next section for all the details!

Copy the environment template

cp .env_template .env

Build the project

just build

Apply Migrations

just -- manage migrate

Load fixtures

just manage loaddata events/fixtures/events.json

Create a superuser

just -- manage createsuperuser

Run the project

just up

After this, you can access the project on the following URLs in your browser:

Quickstart

Prerequisites

  • 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

Installation

  1. Clone the project code
  2. Install the project dependencies
  3. Set all required environment variables
  4. Create a spatial database and add PostgreSQL PostGIS extension
  5. Add PostgreSQL PostGIS extension for testing setup (optional)
  6. Apply database migrations
  7. Load initial events data fixture
  8. Create a superuser to log in to the platform
  9. Run the server
  10. The application will be running in DEBUG mode, at the URL: http://localhost:8000
  11. Run Tests (optional)

Clone

Clone the project locally:

git clone git@github.com:Mitchina/django_birthday_map.git
cd django_birthday_map

Project dependencies

Install dependencies and activate the virtual environment:

uv sync
source .venv/bin/activate

More info:

Environment variables

Copy the example environment file:

$ cp .env_template .env

Edit .env to set your database credentials and other settings.

Spatial Database

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:

\q

See Django PostGIS installation docs for details.

Testing Setup (Optional)

To run tests involving PostGIS, enable PostGIS in the template database:

sudo -u postgres psql -d template1 -c "CREATE EXTENSION IF NOT EXISTS postgis;"

Database Migrations

Apply migrations:

python manage.py migrate

Load Events Data

Load initial events fixture:

python manage.py loaddata events/fixtures/events.json

Create Superuser

Create a superuser for admin access:

python manage.py createsuperuser

Run Server

Start the development server:

python manage.py runserver

Application

The application runs in DEBUG mode at http://localhost:8000.


Running Tests

You can run the test suite with:

pytest

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages