forked from CGM_Public/pretix_original
* Upgrade Django to 3.0 and other dependencies to recent versions * Fix otp version contsraint * Remove six dependency * Resolve some warnings * Fix failing tests * Update django-countries * Resolve all RemovedInDjango31Warnings in test suite * Run isort * Fix import * Update PostgreSQL version on travis
30 lines
808 B
Python
30 lines
808 B
Python
from django.apps import AppConfig
|
|
from django.utils.translation import gettext, gettext_lazy as _
|
|
|
|
from pretix import __version__ as version
|
|
|
|
|
|
class BadgesApp(AppConfig):
|
|
name = 'pretix.plugins.badges'
|
|
verbose_name = _("Badges")
|
|
|
|
class PretixPluginMeta:
|
|
name = _("Badges")
|
|
author = _("the pretix team")
|
|
version = version
|
|
category = "FEATURE"
|
|
description = _("This plugin allows you to generate badges or name tags for your attendees.")
|
|
|
|
def ready(self):
|
|
from . import signals # NOQA
|
|
|
|
def installed(self, event):
|
|
if not event.badge_layouts.exists():
|
|
event.badge_layouts.create(
|
|
name=gettext('Default'),
|
|
default=True,
|
|
)
|
|
|
|
|
|
default_app_config = 'pretix.plugins.badges.BadgesApp'
|