mirror of
https://github.com/pretix/pretix.git
synced 2026-08-26 13:14:40 +00:00
Deprecate PluginType
This commit is contained in:
@@ -30,10 +30,6 @@ Plugin metadata
|
|||||||
The plugin metadata lives inside a ``PretixPluginMeta`` class inside your app's
|
The plugin metadata lives inside a ``PretixPluginMeta`` class inside your app's
|
||||||
configuration class. The metadata class must define the following attributes:
|
configuration class. The metadata class must define the following attributes:
|
||||||
|
|
||||||
``type`` (``pretix.base.plugins.PluginType``):
|
|
||||||
The type of plugin. Currently available: ``RESTRICTION``, ``PAYMENT``,
|
|
||||||
``ADMINFEATURE``
|
|
||||||
|
|
||||||
``name`` (``str``):
|
``name`` (``str``):
|
||||||
The human-readable name of your plugin
|
The human-readable name of your plugin
|
||||||
|
|
||||||
@@ -51,24 +47,20 @@ A working example would be::
|
|||||||
# file: pretix/plugins/timerestriction/__init__.py
|
# file: pretix/plugins/timerestriction/__init__.py
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class TimeRestrictionApp(AppConfig):
|
class PaypalApp(AppConfig):
|
||||||
name = 'pretix.plugins.timerestriction'
|
name = 'pretix.plugins.paypal'
|
||||||
verbose_name = _("Time restriction")
|
verbose_name = _("Stripe")
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.RESTRICTION
|
name = _("PayPal")
|
||||||
name = _("Restriciton by time")
|
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = '1.0.0'
|
version = '1.0.0'
|
||||||
description = _("This plugin adds the possibility to restrict the sale " +
|
description = _("This plugin allows you to receive payments via PayPal")
|
||||||
"of a given item or variation to a certain timeframe " +
|
|
||||||
"or change its price during a certain period.")
|
|
||||||
|
|
||||||
|
|
||||||
default_app_config = 'pretix.plugins.timerestriction.TimeRestrictionApp'
|
default_app_config = 'pretix.plugins.paypal.PaypalApp'
|
||||||
|
|
||||||
|
|
||||||
The ``AppConfig`` class may implement a property ``compatiblity_errors``, that checks
|
The ``AppConfig`` class may implement a property ``compatiblity_errors``, that checks
|
||||||
|
|||||||
@@ -5,6 +5,11 @@ from django.apps import apps
|
|||||||
|
|
||||||
|
|
||||||
class PluginType(Enum):
|
class PluginType(Enum):
|
||||||
|
"""
|
||||||
|
Plugin type classification. THIS IS DEPRECATED, DO NOT USE ANY MORE.
|
||||||
|
This is only not removed yet as external plugins might have references
|
||||||
|
to this enum.
|
||||||
|
"""
|
||||||
RESTRICTION = 1
|
RESTRICTION = 1
|
||||||
PAYMENT = 2
|
PAYMENT = 2
|
||||||
ADMINFEATURE = 3
|
ADMINFEATURE = 3
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ from django.utils.functional import cached_property
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix import __version__ as version
|
from pretix import __version__ as version
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class BankTransferApp(AppConfig):
|
class BankTransferApp(AppConfig):
|
||||||
@@ -11,7 +10,6 @@ class BankTransferApp(AppConfig):
|
|||||||
verbose_name = _("Bank transfer")
|
verbose_name = _("Bank transfer")
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.PAYMENT
|
|
||||||
name = _("Bank transfer")
|
name = _("Bank transfer")
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = version
|
version = version
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ from django.utils.functional import cached_property
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix import __version__ as version
|
from pretix import __version__ as version
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class CheckinlistsApp(AppConfig):
|
class CheckinlistsApp(AppConfig):
|
||||||
@@ -11,7 +10,6 @@ class CheckinlistsApp(AppConfig):
|
|||||||
verbose_name = _("Check-in lists")
|
verbose_name = _("Check-in lists")
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.PAYMENT
|
|
||||||
name = _("Check-in list exporter")
|
name = _("Check-in list exporter")
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = version
|
version = version
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ from django.utils.functional import cached_property
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix import __version__ as version
|
from pretix import __version__ as version
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class PaypalApp(AppConfig):
|
class PaypalApp(AppConfig):
|
||||||
@@ -11,7 +10,6 @@ class PaypalApp(AppConfig):
|
|||||||
verbose_name = _("Stripe")
|
verbose_name = _("Stripe")
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.PAYMENT
|
|
||||||
name = _("PayPal")
|
name = _("PayPal")
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = version
|
version = version
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from django.apps import AppConfig
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix import __version__ as version
|
from pretix import __version__ as version
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class PretixdroidApp(AppConfig):
|
class PretixdroidApp(AppConfig):
|
||||||
@@ -10,7 +9,6 @@ class PretixdroidApp(AppConfig):
|
|||||||
verbose_name = _("pretixdroid API")
|
verbose_name = _("pretixdroid API")
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.ADMINFEATURE
|
|
||||||
name = _("pretixdroid API")
|
name = _("pretixdroid API")
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = version
|
version = version
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ from django.utils.functional import cached_property
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix import __version__ as version
|
from pretix import __version__ as version
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class ReportsApp(AppConfig):
|
class ReportsApp(AppConfig):
|
||||||
@@ -11,7 +10,6 @@ class ReportsApp(AppConfig):
|
|||||||
verbose_name = _("Report exporter")
|
verbose_name = _("Report exporter")
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.PAYMENT
|
|
||||||
name = _("Report exporter")
|
name = _("Report exporter")
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = version
|
version = version
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from django.apps import AppConfig
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix import __version__ as version
|
from pretix import __version__ as version
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class SendMailApp(AppConfig):
|
class SendMailApp(AppConfig):
|
||||||
@@ -10,7 +9,6 @@ class SendMailApp(AppConfig):
|
|||||||
verbose_name = _("Send out emails")
|
verbose_name = _("Send out emails")
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.ADMINFEATURE
|
|
||||||
name = _("Send out emails")
|
name = _("Send out emails")
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = version
|
version = version
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from django.apps import AppConfig
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix import __version__ as version
|
from pretix import __version__ as version
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class StatisticsApp(AppConfig):
|
class StatisticsApp(AppConfig):
|
||||||
@@ -10,7 +9,6 @@ class StatisticsApp(AppConfig):
|
|||||||
verbose_name = _("Statistics")
|
verbose_name = _("Statistics")
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.ADMINFEATURE
|
|
||||||
name = _("Statistics")
|
name = _("Statistics")
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = version
|
version = version
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ from django.utils.functional import cached_property
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix import __version__ as version
|
from pretix import __version__ as version
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class StripeApp(AppConfig):
|
class StripeApp(AppConfig):
|
||||||
@@ -11,7 +10,6 @@ class StripeApp(AppConfig):
|
|||||||
verbose_name = _("Stripe")
|
verbose_name = _("Stripe")
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.PAYMENT
|
|
||||||
name = _("Stripe")
|
name = _("Stripe")
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = version
|
version = version
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ from django.utils.functional import cached_property
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from pretix import __version__ as version
|
from pretix import __version__ as version
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class TicketOutputPdfApp(AppConfig):
|
class TicketOutputPdfApp(AppConfig):
|
||||||
@@ -11,7 +10,6 @@ class TicketOutputPdfApp(AppConfig):
|
|||||||
verbose_name = _("PDF ticket output")
|
verbose_name = _("PDF ticket output")
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.PAYMENT
|
|
||||||
name = _("PDF ticket output")
|
name = _("PDF ticket output")
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = version
|
version = version
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
from pretix.base.plugins import PluginType
|
|
||||||
|
|
||||||
|
|
||||||
class TestDummyApp(AppConfig):
|
class TestDummyApp(AppConfig):
|
||||||
name = 'tests.testdummy'
|
name = 'tests.testdummy'
|
||||||
verbose_name = '.testdummy'
|
verbose_name = '.testdummy'
|
||||||
|
|
||||||
class PretixPluginMeta:
|
class PretixPluginMeta:
|
||||||
type = PluginType.RESTRICTION
|
|
||||||
name = '.testdummy'
|
name = '.testdummy'
|
||||||
version = '1.0.0'
|
version = '1.0.0'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user