예제 #1
0
    def delete(self):
        """Delete view endpoint."""

        choices = (
            interstitial.Choice("Yes", self.delete_item, id="btn-delete-yes"),
            interstitial.Choice("No", self.cancel_delete, id="btn-delete-no"),
        )

        if self.request.method == "POST":
            return interstitial.process_interstitial(self.request, choices)

        # Expose base_template to the template rendering
        base_template = self.base_template

        return locals()
예제 #2
0
파일: views.py 프로젝트: matumaros/websauna
    def delete(self):
        """Delete view endpoint."""

        choices = (
            interstitial.Choice("Yes", self.delete_object, id="btn-delete-yes"),
            interstitial.Choice("No", self.cancel_delete, id="btn-delete-no"),
        )

        if self.request.method == "POST":
            return interstitial.process_interstitial(self.request, choices)

        # Expose base_template to the template rendering
        base_template = self.base_template

        return locals()