diff --git a/aleksis/apps/paweljong/forms.py b/aleksis/apps/paweljong/forms.py index df90a6f04d86ad51e5f7d9fab8d0fa2929c03b37..bac09b2829a4c3de5bdcf3a06b6caaedcbb72b99 100644 --- a/aleksis/apps/paweljong/forms.py +++ b/aleksis/apps/paweljong/forms.py @@ -508,7 +508,7 @@ class EventCheckpointForm(forms.Form): js = ("https://unpkg.com/html5-qrcode", "js/paweljong/checkpoint.js") layout = Layout( - "username", "comment". + "username", "comment", Row("lat", "lon"), ) @@ -530,7 +530,7 @@ class EventCheckpointForm(forms.Form): min_value=-90.0, max_value=90.0, max_digits=10, - decimal_palces=8, + decimal_places=8, # widget=forms.HiddenInput() ) lon = forms.DecimalField( @@ -538,6 +538,6 @@ class EventCheckpointForm(forms.Form): min_value=-180.0, max_value=180.0, max_digits=11, - decimal_palces=8, + decimal_places=8, # widget=forms.HiddenInput() ) diff --git a/aleksis/apps/paweljong/models.py b/aleksis/apps/paweljong/models.py index 79bd9a0c4966daf87a01a517761596fbc03c8489..576dbaa05710d500c3070f91a46d522493322aef 100644 --- a/aleksis/apps/paweljong/models.py +++ b/aleksis/apps/paweljong/models.py @@ -409,13 +409,13 @@ class EventRegistration(ExtensibleModel): class Checkpoint(ExtensibleModel): - event = models.ForeignKey(Event, verbose_name=_("Related event"), related_name="checkpoints") - person = models.ForeignKey(Person, verbose_name=_("Checked person"), related_name="event_checkpoints")) - checked_by = models.ForeignKey(Person, verbose_name=_("Checked by person"), related_name="event_checkpoints_created")) + event = models.ForeignKey(Event, verbose_name=_("Related event"), related_name="checkpoints", on_delete=models.CASCADE) + person = models.ForeignKey(Person, verbose_name=_("Checked person"), related_name="event_checkpoints", on_delete=models.CASCADE) + checked_by = models.ForeignKey(Person, verbose_name=_("Checked by person"), related_name="event_checkpoints_created", on_delete=models.CASCADE) comment = models.CharField(max_length=60, verbose_name=_("Comment")) timestamp = models.DateTimeField(verbose_name=_("Date and time of check"), auto_now_add=True) - lat = models.DecimalField(max_digits=10, decimal_places=8, verbose_name=_("Latitude of check"), blank=True, null=True, on_delete=models.CASCADE) - lon = models.DecimalField(max_digits=11, decimal_places=8, verbose_name=_("Longitude of check"), blank=True, null=True, on_delete=models.CASCADE) + lat = models.DecimalField(max_digits=10, decimal_places=8, verbose_name=_("Latitude of check"), blank=True, null=True) + lon = models.DecimalField(max_digits=11, decimal_places=8, verbose_name=_("Longitude of check"), blank=True, null=True)