Skip to content

Commit

Permalink
🚚 [#4908] Rename plugin
Browse files Browse the repository at this point in the history
Plugin name did not make sense before
  • Loading branch information
viktorvanwijk committed Dec 17, 2024
1 parent 8a3e039 commit 5c350cb
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/openforms/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
"openforms.registrations.contrib.objects_api",
"openforms.registrations.contrib.microsoft_graph.apps.MicrosoftGraphApp",
"openforms.registrations.contrib.camunda.apps.CamundaApp",
"openforms.registrations.contrib.new_plugin",
"openforms.registrations.contrib.json",
"openforms.prefill",
"openforms.prefill.contrib.demo.apps.DemoApp",
"openforms.prefill.contrib.kvk.apps.KVKPrefillApp",
Expand Down
12 changes: 12 additions & 0 deletions src/openforms/registrations/contrib/json/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _


# TODO-4098: maybe rename to FVaJ (Form Variables as JSON)
class JSONConfig(AppConfig):
name = "openforms.registrations.contrib.json"
label = "registrations_json"
verbose_name = _("JSON plugin")

def ready(self):
from . import plugin # noqa
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from openforms.utils.mixins import JsonSchemaSerializerMixin


class NewPluginOptionsSerializer(JsonSchemaSerializerMixin, serializers.Serializer):
class JSONOptionsSerializer(JsonSchemaSerializerMixin, serializers.Serializer):
# TODO-4098: is service enough, or do we need an API group like the ObjectsAPI?
service = PrimaryKeyRelatedAsChoicesField(
queryset=Service.objects.all(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
from openforms.submissions.models import Submission
from ...base import BasePlugin, OptionsT # openforms.registrations.base
from ...registry import register # openforms.registrations.registry
from .config import NewPluginOptionsSerializer
from .config import JSONOptionsSerializer


@register("new_plugin")
class NewPlugin(BasePlugin):
@register("json")
class JSONPlugin(BasePlugin):
verbose_name = _("New fancy plugin")
configuration_options = NewPluginOptionsSerializer
configuration_options = JSONOptionsSerializer

def register_submission(self, submission: Submission, options: OptionsT) -> None:
print(options)
Expand Down
12 changes: 0 additions & 12 deletions src/openforms/registrations/contrib/new_plugin/apps.py

This file was deleted.

0 comments on commit 5c350cb

Please sign in to comment.