Added a default set of active plugins

This commit is contained in:
Raphael Michel
2015-09-08 21:12:56 +02:00
parent 2ec4cbeceb
commit 6279540372
3 changed files with 13 additions and 1 deletions
+7 -1
View File
@@ -31,6 +31,7 @@ Example::
cookiedomain=.pretix.de
securecookie=on
datadir=/data
plugins_default=pretix.plugins.sendmail,pretix.plugins.statistics
``instance_name``
The name of this installation. Default: ``pretix.de``
@@ -54,7 +55,12 @@ Example::
``datadir``
The local path to a data directory that will be used for storing user uploads and similar
data. Defaults to the value of the environment variable ``DATA_DIR`` or ``data``.
data. Defaults to thea value of the environment variable ``DATA_DIR`` or ``data``.
``plugins_default``
A comma-separated list of plugins that are enabled by default for all new events.
Defaults to ``pretix.plugins.sendmail,pretix.plugins.statistics``.
Locale settings
---------------
+3
View File
@@ -3,6 +3,7 @@ from django.core.urlresolvers import reverse
from django.shortcuts import render
from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView, ListView, TemplateView
from django.conf import settings
from pretix.base.models import Event, EventPermission, OrganizerPermission
from pretix.control.forms.event import EventCreateForm
@@ -63,6 +64,8 @@ class EventCreate(OrganizerPermissionRequiredMixin, CreateView):
event=form.instance, user=self.request.user,
)
self.object = form.instance
self.object.plugins = settings.PRETIX_PLUGINS_DEFAULT
self.object.save()
return ret
def get_success_url(self) -> str:
+3
View File
@@ -61,6 +61,9 @@ PRETIX_GLOBAL_REGISTRATION = config.getboolean('pretix', 'global_registration',
SITE_URL = config.get('pretix', 'url', fallback='http://localhost')
PRETIX_PLUGINS_DEFAULT = config.get('pretix', 'plugins_default',
fallback='pretix.plugins.sendmail,pretix.plugins.statistics')
DEFAULT_CURRENCY = config.get('pretix', 'currency', fallback='EUR')
ALLOWED_HOSTS = config.get('django', 'hosts', fallback='localhost').split(',')