Skip to content

addevent form processing won't create more than one event #78

@bepetersn

Description

@bepetersn

The logic required to make this work is already contained in the addvolunteer form.

However, the admin interface has this functionality already, and this can be copied to create the desired situation. Basically, you need to do a try-except, and inside of that do Event.objects.get() to check if the event already exists. The check for existence is necessarily a check for equality, and this can be based on time, date, and type all together...

On that note, it might be worth checking django docs to see if there is an idiom for defining the behavior of the equality operation for a model instance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions