Rename tixl to pretix

This commit is contained in:
Raphael Michel
2015-01-19 01:10:35 +01:00
parent fd93dcae3c
commit 6648e7ed03
107 changed files with 524 additions and 529 deletions

View File

@@ -85,17 +85,17 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/tixl.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pretix.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/tixl.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pretix.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/tixl"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/tixl"
@echo "# mkdir -p $$HOME/.local/share/devhelp/pretix"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pretix"
@echo "# devhelp"
epub:

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# tixl documentation build configuration file, created by
# pretix documentation build configuration file, created by
# sphinx-quickstart on Mon Sep 8 15:13:08 2014.
#
# This file is execfile()d with the current directory set to its
@@ -49,7 +49,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = 'tixl'
project = 'pretix'
copyright = '2014, Raphael Michel'
# The version info for the project you're documenting, acts as replacement for
@@ -182,7 +182,7 @@ html_use_index = False
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'tixldoc'
htmlhelp_basename = 'pretixdoc'
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd: # only import and set the theme if we're building docs locally
@@ -208,7 +208,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'tixl.tex', 'tixl Documentation',
('index', 'pretix.tex', 'pretix Documentation',
'Raphael Michel', 'manual'),
]
@@ -238,7 +238,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'tixl', 'tixl Documentation',
('index', 'pretix', 'pretix Documentation',
['Raphael Michel'], 1)
]
@@ -252,8 +252,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'tixl', 'tixl Documentation',
'Raphael Michel', 'tixl', 'One line description of project.',
('index', 'pretix', 'pretix Documentation',
'Raphael Michel', 'pretix', 'One line description of project.',
'Miscellaneous'),
]

View File

@@ -4,18 +4,18 @@
Plugin basics
=============
It is possible to extend tixl with custom Python code using the official plugin
It is possible to extend pretix with custom Python code using the official plugin
API. Every plugin has to be implemented as an independent Django 'app' living
either in an own python package either installed like any python module or in
the ``tixlplugins/`` directory of your tixl installation. A plugin may only
the ``pretixplugins/`` directory of your pretix installation. A plugin may only
require two steps to install:
* Add it to the ``INSTALLED_APPS`` setting of Django in ``tixl/settings.py``
* Add it to the ``INSTALLED_APPS`` setting of Django in ``pretix/settings.py``
* Perform database migrations by using ``python manage.py migrate``
The communication between tixl and the plugins happens via Django's
`signal dispatcher`_ pattern. The core modules of tixl, ``tixlbase``,
``tixlcontrol`` and ``tixlpresale`` expose a number of signals which are documented
The communication between pretix and the plugins happens via Django's
`signal dispatcher`_ pattern. The core modules of pretix, ``pretixbase``,
``pretixcontrol`` and ``pretixpresale`` expose a number of signals which are documented
on the next pages.
.. _`pluginsetup`:
@@ -23,15 +23,15 @@ on the next pages.
Creating a plugin
-----------------
To create a new plugin, create a new python package as a subpackage to ``tixlplugins``.
In order to do so, you can place your module into tixl's :file:`tixlplugins` folder *or
anywhere else in your python import path* inside a folder called ``tixlplugins``.
To create a new plugin, create a new python package as a subpackage to ``pretixplugins``.
In order to do so, you can place your module into pretix's :file:`pretixplugins` folder *or
anywhere else in your python import path* inside a folder called ``pretixplugins``.
.. IMPORTANT::
This makes use of a design pattern called `namespace packages`_ which is only
implicitly available as of Python 3.4. As we aim to support Python 3.2 for a bit
longer, you **MUST** put **EXACLTY** the following content into ``tixlplugins/__init__.py``
if you create a new ``tixlplugins`` folder somewhere in your path::
longer, you **MUST** put **EXACLTY** the following content into ``pretixplugins/__init__.py``
if you create a new ``pretixplugins`` folder somewhere in your path::
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
@@ -48,17 +48,17 @@ example, taken from the time restriction module (see next chapter) as a template
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
from tixlbase.plugins import PluginType
from pretixbase.plugins import PluginType
class TimeRestrictionApp(AppConfig):
name = 'tixlplugins.timerestriction'
name = 'pretixplugins.timerestriction'
verbose_name = _("Time restriction")
class TixlPluginMeta:
type = PluginType.RESTRICTION
name = _("Restriciton by time")
author = _("the tixl team")
author = _("the pretix team")
version = '1.0.0'
description = _("This plugin adds the possibility to restrict the sale " +
"of a given item or variation to a certain timeframe " +
@@ -67,7 +67,7 @@ example, taken from the time restriction module (see next chapter) as a template
def ready(self):
from . import signals # NOQA
default_app_config = 'tixlplugins.timerestriction.TimeRestrictionApp'
default_app_config = 'pretixplugins.timerestriction.TimeRestrictionApp'
.. IMPORTANT::
You have to implement a ``TixlPluginMeta`` class like in the example to make your

View File

@@ -4,7 +4,7 @@
Writing a restriction plugin
============================
Please make sure you have read and understood the :ref:`basic idea being tixl's restrictions
Please make sure you have read and understood the :ref:`basic idea being pretix's restrictions
<restrictionconcept>`. In this document, we will walk through the creation of a restriction
plugin using the example of a restriction by date and time.
@@ -15,14 +15,14 @@ The restriction model
It is very likely that your new restriction plugin needs to store data. In order to do
so, it should define its own model with a name related to what your restriction does,
e.g. ``TimeRestriction``. This model should be a child class of ``tixlbase.models.BaseRestriction``.
e.g. ``TimeRestriction``. This model should be a child class of ``pretixbase.models.BaseRestriction``.
You do not need to define custom fields, but you should create at least an empty model.
In our example, we put the following into :file:`tixlplugins/timerestriction/models.py`::
In our example, we put the following into :file:`pretixplugins/timerestriction/models.py`::
from django.db import models
from django.utils.translation import ugettext_lazy as _
from tixlbase.models import BaseRestriction
from pretixbase.models import BaseRestriction
class TimeRestriction(BaseRestriction):
@@ -52,14 +52,14 @@ Availability determination
^^^^^^^^^^^^^^^^^^^^^^^^^^
This is the one signal *every* restriction plugin has to listen for, as your plugin does not
restrict anything without doing so. It is available as ``tixlbase.signals.determine_availability``
and is sent out every time some component of tixl wants to know whether a specific item or
restrict anything without doing so. It is available as ``pretixbase.signals.determine_availability``
and is sent out every time some component of pretix wants to know whether a specific item or
variation is available for sell.
It is sent out with several keyword arguments:
``item``
The instance of ``tixlbase.models.Item`` in question.
The instance of ``pretixbase.models.Item`` in question.
``variations``
A list of dictionaries in the same format as ``Item.get_all_variations``:
The list contains one dictionary per variation, where the ``Property`` IDs are
@@ -68,7 +68,7 @@ It is sent out with several keyword arguments:
the item does not have any properties, the list will contain exactly one empty
dictionary. Please note: this is *not* the list of all possible variations, this is
only the list of all variations the frontend likes to determine the status for.
Technically, you won't get ``dict`` objects but ``tixlbase.types.VariationDict``
Technically, you won't get ``dict`` objects but ``pretixbase.types.VariationDict``
objects, which behave exactly the same but add some extra methods.
``context``
A yet-to-be-defined context object containing information about the user and the order
@@ -103,7 +103,7 @@ In our example, the implementation could look like this::
from django.dispatch import receiver
from django.utils.timezone import now
from tixlbase.signals import determine_availability
from pretixbase.signals import determine_availability
from .models import TimeRestriction
@@ -217,12 +217,12 @@ Control interface formsets
To make it possible for the event organizer to configure your restriction, there is a
'Restrictions' page in the item configuration. This page is able to show a formset for
each restriction plugin, but *you* are required to create this formset. This is why you
should listen to the the ``tixlcontrol.signals.restriction_formset`` signal.
should listen to the the ``pretixcontrol.signals.restriction_formset`` signal.
Currently, the signal comes with only one keyword argument:
``item``
The instance of ``tixlbase.models.Item`` we want a formset for.
The instance of ``pretixbase.models.Item`` we want a formset for.
You are expected to return a dict containing the following items:
@@ -245,9 +245,9 @@ Our time restriction example looks like this::
from django.dispatch import receiver
from django.forms.models import inlineformset_factory
from tixlcontrol.signals import restriction_formset
from tixlbase.models import Item
from tixlcontrol.views.forms import (
from pretixcontrol.signals import restriction_formset
from pretixbase.models import Item
from pretixcontrol.views.forms import (
VariationsField, RestrictionInlineFormset, RestrictionForm
)

View File

@@ -7,18 +7,18 @@ Basic terminology
The components
^^^^^^^^^^^^^^
The project tixl is split into several components. The main three of them are:
The project pretix is split into several components. The main three of them are:
**tixlbase**
**pretixbase**
Tixlbase is the foundation below all other components. It is primarily
responsible for the data structures and database communication. It also hosts
several utilities which are used by multiple other components.
**tixlcontrol**
**pretixcontrol**
Tixlcontrol is the web-based backend software which allows organizers to
create and manage their events, items, orders and tickets.
**tixlpresale**
**pretixpresale**
Tixlpresale is the ticket-shop itself, containing all the parts visible to the
end user.
@@ -29,7 +29,7 @@ Tixl is all about **events**, which are defined as something happening somewhere
Every Event is managed by the **organizer**, an abstract entity running the event.
Tixl is used by **users**. We want to enable global users who can just login into
tixl and buy tickets for as many events as they like but at the same time it
pretix and buy tickets for as many events as they like but at the same time it
should be possible to create some kind of local user to have a temporary account
just to buy tickets for one single event.
@@ -46,7 +46,7 @@ as our primary key:
**Local users**
Local users do only exist inside the scope of one event. They are identified by
usernames, which are only valid for exactly one event. Internally, their identifier
is "{username}@{event.id}.event.tixl"
is "{username}@{event.id}.event.pretix"
**Global users**
Global users exist everywhere in the installation of Tixl. They can buy tickets
@@ -57,7 +57,7 @@ as our primary key:
Items and variations
^^^^^^^^^^^^^^^^^^^^
The purpose of tixl is to sell **items** (which belong to **events**) to **users**.
The purpose of pretix is to sell **items** (which belong to **events**) to **users**.
An **item** is a abstract thing, popular examples being event tickets or a piece of
merchandise, like 'T-Shirt'. An **item** can have multiple **properties** with multiple
**values** each. For example, the **item** 'T-Shirt' could have the **property** 'Size'
@@ -79,7 +79,7 @@ include 'Name' or 'age'.
Restrictions
^^^^^^^^^^^^
The probably most powerful concepts of tixl is the very abstract concept of **restricitons**.
The probably most powerful concepts of pretix is the very abstract concept of **restricitons**.
We already know that **items** can come in very different **variations**, but a
**restriction** decides whether an variation is available for sale and assign **prices**
to **variations**. There are **restriction types** (pieces of code implementing the
@@ -115,7 +115,7 @@ Any number of **restrictions** can be applied to the whole of a **item** or even
sense otherwise on an one-dimensional time axis).
* If multiple restrictions apply which set the price, the *cheapest* price determines the final price.
Restrictions can be implemented using a plugin system and do not require changes to the tixl codebase.
Restrictions can be implemented using a plugin system and do not require changes to the pretix codebase.
Restriction by number
"""""""""""""""""""""

View File

@@ -17,7 +17,7 @@ Technical goals
Feature goals
-------------
* One tixl software installation has to cope with multiple events by multiple organizers
* One pretix software installation has to cope with multiple events by multiple organizers
* There is no code access necessary to create a new event
* Tixl is abstract in many ways to adopt to as much events as possible.

View File

@@ -5,8 +5,8 @@ Obtain a copy of the source code
--------------------------------
Just clone our git repository including its submodules::
git clone --recursive https://github.com/tixl/tixl.git
cd tixl/
git clone --recursive https://github.com/pretix/pretix.git
cd pretix/
External Dependencies
---------------------
@@ -27,7 +27,7 @@ environment and activate it for your current session::
source env/bin/activate
You should now see a ``(env)`` prepended to your shell prompt. You have to do this
in every shell you use to work with tixl (or configure your shell to do so
in every shell you use to work with pretix (or configure your shell to do so
automatically).
Working with the code
@@ -48,7 +48,7 @@ source code for strings to be translated and update the ``*.po`` files according
make localegen
To actually see tixl in your language, you have to compile the ``*.po`` files to their
To actually see pretix in your language, you have to compile the ``*.po`` files to their
optimized binary ``*.mo`` counterparts::
make localecompile

View File

@@ -6,17 +6,17 @@ Python source code
All the source code lives in ``src/``, which has several subdirectories.
tixl/
pretix/
This directory contains the basic Django settings and URL routing.
tixlbase/
pretixbase/
This is the django app containing all the models and methods which are
essential to all of tixl's features.
essential to all of pretix's features.
tixlcontrol/
pretixcontrol/
This is the django app containing the frontend for organizers.
tixlpresale/
pretixpresale/
This is the django app containing the frontend for users buying tickets.
helpers/
@@ -37,24 +37,24 @@ LESS source code
We use less as a preprocessor for CSS. Our own less code is built in the same
step as Bootstrap and FontAwesome, so their mixins etc. are fully available.
tixlcontrol
tixlcontrol has two main LESS files, ``tixlcontrol/static/tixlcontrol/less/main.less`` and
``tixlcontrol/static/tixlcontrol/less/auth.less``, importing everything else.
pretixcontrol
pretixcontrol has two main LESS files, ``pretixcontrol/static/pretixcontrol/less/main.less`` and
``pretixcontrol/static/pretixcontrol/less/auth.less``, importing everything else.
3rd-party assets
^^^^^^^^^^^^^^^^
Bootstrap
Bootstrap lives as a git submodule at ``tixlbase/static/bootstrap/``
Bootstrap lives as a git submodule at ``pretixbase/static/bootstrap/``
Font Awesome
Font Awesome lives as a git submodule at ``tixlbase/static/fontawesome/``
Font Awesome lives as a git submodule at ``pretixbase/static/fontawesome/``
jQuery
jQuery lives as a single JavaScript file in ``tixlbase/static/jquery/js/``
jQuery lives as a single JavaScript file in ``pretixbase/static/jquery/js/``
jQuery plugin: Django formsets
Our own modified version of `django-formset-js`_ is available as an independent
django app and installed via pip.
.. _django-formset-js: https://github.com/tixl/django-formset-js
.. _django-formset-js: https://github.com/pretix/django-formset-js

View File

@@ -1,9 +1,9 @@
.. tixl documentation master file, created by
.. pretix documentation master file, created by
sphinx-quickstart on Mon Sep 8 15:13:08 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to tixl's documentation!
Welcome to pretix's documentation!
================================
Contents:

View File

@@ -115,9 +115,9 @@ if "%1" == "qthelp" (
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\tixl.qhcp
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\pretix.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\tixl.ghc
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\pretix.ghc
goto end
)