Mirror of dukop.dk's source code. (From https://codeberg.org/dukop/django-dukop)
  • Python 70.2%
  • HTML 19.3%
  • SCSS 8%
  • JavaScript 2%
  • Shell 0.3%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-25 09:39:15 +02:00
.forgejo/workflows Try to restore cache step 2024-12-17 22:51:05 +01:00
media Start new Django project based on https://github.com/keimlink/django-project-package-template 2019-01-12 18:38:52 +01:00
src/dukop The initial value of origin_sphere needs to be defined 2026-08-25 09:36:53 +02:00
tests Update pytest, fix some tests 2026-08-01 00:08:48 +02:00
.gitignore New .gitignore 2022-05-30 14:37:14 +02:00
.pre-commit-config.yaml Update fixtures imports for a more linting-friendly pattern 2024-12-02 00:17:29 +01:00
.travis.yml Bump Travis python 3.8 2021-04-10 23:59:00 +02:00
deploy.sh Let's maintain the deploy script in git 2023-01-23 23:33:42 +01:00
docker-compose.yml Preliminary docker setup 2026-01-29 23:59:57 +01:00
docker-entrypoint.sh Preliminary docker setup 2026-01-29 23:59:57 +01:00
Dockerfile Preliminary docker setup 2026-01-29 23:59:57 +01:00
LICENSE Initial commit 2019-01-12 18:32:10 +01:00
manage.py Use separate test settings, bump test dependencies 2021-04-24 17:43:42 +02:00
MANIFEST.in Start new Django project based on https://github.com/keimlink/django-project-package-template 2019-01-12 18:38:52 +01:00
pytest.ini Move test case code for recurrences to be reused 2024-02-26 07:18:01 +01:00
README.md Preliminary docker setup 2026-01-29 23:59:57 +01:00
setup.cfg Nice up a dropdown, notify only origin_sphere 2026-08-01 12:50:52 +02:00
setup.py Start new Django project based on https://github.com/keimlink/django-project-package-template 2019-01-12 18:38:52 +01:00

dukop.dk

Build Status

Collaborate calendar for local spheres, such as "DukOp Copenhagen" or "DukOp Århus".

Development (Docker)

If you don't have Docker, skip to the next section.

# Create the database
docker compose run app /app/manage.py migrate

# Create your own superuser
docker compose run app /app/manage.py createsuperuser

# Create some events (re-run this later if you need more!)
docker compose run app /app/manage.py calendar_fixtures

# Run the server, now go to http://127.0.0.1:8000
docker compose up

Development requirements (no Docker)

What you are now looking at is a Python package, structured as a Django project. The various other Python packages that it depends on will be installed while you install the package itself.

These are the system requirements necessary for running the below Quickstart:

  • Python 3.10+ (is already on your system)
  • Postgres (only for deployment, not needed for development)

Other requirements are specified as Python packages in the Quickstart below and will be installed in a virtual environment.

Quickstart

Install the project and the development dependencies into a virtual environment:

From a commandline, run:

# Create the virtual environment
python3 -m venv .venv

# Activate the virtual environment
source .venv/bin/activate

# Upgrade to the latest Python dist tools (pip etc)
python3 -m pip install --upgrade pip setuptools wheel

# Install the package in development mode, meaning that you can keep editing
# the sources and not have to re-install.
python3 -m pip install --editable ".[dev]"

# Run the migration script to create the database
python3 manage.py migrate

# Create a superuser account so you can also log in for the first time.
python3 manage.py createsuperuser

# Generate some random event data
python3 manage.py calendar_fixtures

The development environment is now ready with an empty database and a single admin user. To run the server and access it from your browser, use the runserver command:

./manage.py runserver

After running the server for the first time, consider logging in on http://127.0.0.1:8080/admin/ to create some data for development.

Updating from git

Once in a while, you will probably pull the latest master. In this case, you could need to run the migration script in order to update your local development database:

./manage.py migrate

Running tests

More details to come, but for now, just open a PR and wait for Travis or run this:

pytest

Starting a New App

First create a new directory in the apps directory:

mkdir src/dukop/apps/name

Then pass the path to the new directory to the startapp command:

mkdir src/dukop/apps/<name>
python manage.py startapp name src/dukop/apps/<name>

API

On https://dukop.dk/api/v1/, you'll find Duk Op's API endpoints. It's very basic and needs requests from users of the API to improve.

You can access API docs here:

https://dukop.dk/api/v1/docs

In order to test the API, please always create unpublished events.

All endpoints are private, so you need to generate a user token to access them.

Tokens are created on /users/tokens/.

The API is intended for creating events.

  • Create an event with times
  • Upload an image to an event
  • Edit an event (but not the times)

It is strongly suggested that users go to the website, check all auto-created events and publish them manually.

We can probably add more, but it's pretty minimal for now.

  • Edit event times
  • Create/edit recurring series

However, these are pretty advanced uses, which are probably better for users to do manually on the site.