Commit e15e62b5 authored by Staś Kycia's avatar Staś Kycia
Browse files

voting terminals; new email backend for dashboard configuration; landing page;...

voting terminals; new email backend for dashboard configuration; landing page; admnin panel improvements
parent 9947d76b
Loading
Loading
Loading
Loading
+1 −1
Changes for Procfile: 1 added line, 1 removed line.
Original line number Diff line number Diff line
web: uv run manage.py runserver
web: uv run uvicorn wybory.asgi:application --reload --host 0.0.0.0
worker: uv run manage.py rqworker default email email_batch reports --job-class django_tasks_rq.Job
+2 −2
Changes for elections/models.py: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ class Election(models.Model):

        return super().save(*args, **kwargs)

    def cast_vote(self, voter, choice):
    def cast_vote(self, voter, choice, terminal=None):
        if choice == "invalid":
            self.invalid_votes += 1
            self.save()
@@ -111,7 +111,7 @@ class Election(models.Model):

        from vote.models import Participation

        participation = Participation(voter=voter, election=self)
        participation = Participation(voter=voter, election=self, assigned_by=(terminal.assigned_by if terminal else None), is_remote=(False if terminal is not None else True))
        participation.save()

    class Meta:

home/__init__.py

0 → 100644
+0 −0

Empty file added.

home/admin.py

0 → 100644
+3 −0
Changes for home/admin.py: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
from django.contrib import admin

# Register your models here.

home/apps.py

0 → 100644
+5 −0
Changes for home/apps.py: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
from django.apps import AppConfig


class HomeConfig(AppConfig):
    name = 'home'
Loading