Skip to content
Snippets Groups Projects
Commit fc765925 authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

Apply updateded pretix plugin cookiecutter

parent 9b1329dc
No related branches found
No related tags found
No related merge requests found
......@@ -9,14 +9,6 @@ cache:
paths:
- .cache
docformatter:
stage: linting
image: python:3
before_script:
- pip3 install -U pip docformatter
script:
- docformatter --check -r .
black:
stage: linting
image: python:3
......@@ -40,3 +32,11 @@ flake8:
- pip3 install -U pip flake8
script:
- flake8 .
check-manifest:
stage: linting
image: python:3
before_script:
- pip3 install -U pip check-manifest
script:
- check-manifest .
......@@ -10,7 +10,6 @@ fi
echo "#!/bin/sh" >> $GIT_DIR/hooks/pre-commit
echo "set -e" >> $GIT_DIR/hooks/pre-commit
echo "source $VENV_ACTIVATE" >> $GIT_DIR/hooks/pre-commit
echo "docformatter --check -r ." >> $GIT_DIR/hooks/pre-commit
echo "black --check ." >> $GIT_DIR/hooks/pre-commit
echo "isort -c ." >> $GIT_DIR/hooks/pre-commit
echo "flake8 ." >> $GIT_DIR/hooks/pre-commit
......
recursive-include pretix_public_registrations/static *
recursive-include pretix_public_registrations/templates *
recursive-include pretix_public_registrations/locale *
include LICENSE
exclude .gitlab-ci.yml
......@@ -3,23 +3,41 @@ Pretix public registrations
This is a plugin for `pretix`_.
This plugin will give the option to attendees of an event to mark their registration as public. Public registrations
will be shown along their answers to questions marked as public by the organizers on a world-readable page.
Development setup
-----------------
1. Make sure that you have a working `pretix development setup`_.
2. Clone this repository, eg to ``local/pretix-public-registrations``.
2. Clone this repository.
3. Activate the virtual environment you use for pretix development.
4. Execute ``python setup.py develop`` within this directory to register this
application with pretix's plugin registry.
4. Execute ``python setup.py develop`` within this directory to register this application with pretix's plugin registry.
5. Execute ``make`` within this directory to compile translations.
6. Restart your local pretix server. You can now use the plugin from this
repository for your events by enabling it in the 'plugins' tab in the
settings.
6. Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the 'plugins' tab in the settings.
This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed::
pip install flake8 isort black
To check your plugin for rule violations, run::
black --check .
isort -c .
flake8 .
You can auto-fix some of these issues by running::
isort .
black .
To automatically check for these issues before you commit, you can run ``.install-hooks``.
License
......
from django.utils.translation import gettext_lazy as _
try:
from pretix.base.plugins import PluginConfig
except ImportError:
raise RuntimeError("Please use pretix 2.7 or above to run this plugin!")
__version__ = "1.4.0"
class PluginApp(PluginConfig):
name = "pretix_public_registrations"
verbose_name = "Pretix public registrations"
class PretixPluginMeta:
name = _("Pretix public registrations")
author = "Felix Schäfer, Dominik Weitz"
description = _(
"This plugin will give the option to attendees of an event to mark their registration as public. "
"Public registrations will be shown along their answers to questions marked as public by the organizers on a world-readable page."
)
visible = True
version = __version__
category = "FEATURE"
compatibility = "pretix>=2.7.0"
def ready(self):
from . import signals # NOQA
default_app_config = "pretix_public_registrations.PluginApp"
from django.utils.translation import gettext_lazy
from . import __version__
try:
from pretix.base.plugins import PluginConfig
except ImportError:
raise RuntimeError("Please use pretix 2.7 or above to run this plugin!")
class PluginApp(PluginConfig):
name = "pretix_public_registrations"
verbose_name = "Pretix public registrations"
class PretixPluginMeta:
name = gettext_lazy("Pretix public registrations")
author = "Felix Schäfer, Dominik Weitz"
description = gettext_lazy(
"This plugin will give the option to attendees of an event to mark their registration as public. "
"Public registrations will be shown along their answers to questions marked as public by the organizers on "
"a world-readable page."
)
visible = True
version = __version__
category = "FEATURE"
compatibility = "pretix>=2.7.0"
def ready(self):
from . import signals # NOQA
[plugin]
package = "pretix-public-registrations"
modules = [ "pretix_public_registrations" ]
marketplace_name = "public-registrations"
......@@ -36,6 +36,9 @@ exclude_lines =
ignore =
.update-locales.sh
.install-hooks.sh
pretixplugin.toml
Makefile
manage.py
tests/*
*.po
.gitkeep
......@@ -2,10 +2,11 @@ import os
from distutils.command.build import build
from django.core import management
from setuptools import setup, find_packages
from setuptools import find_packages, setup
from pretix_public_registrations import __version__
try:
with open(
os.path.join(os.path.dirname(__file__), "README.rst"), encoding="utf-8"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment