Improve documentation formatting

This commit is contained in:
Raphael Michel
2015-06-28 16:23:28 +02:00
parent 75b8d800ea
commit 6ceb061205
4 changed files with 17 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ Feature goals
* One pretix 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 * There is no code access necessary to create a new event
*Tixe is abstract in many ways to adopt to as much events as possible. * Pretix is abstract in many ways to adopt to as much events as possible.
* Tickets are only an instance of an abstract model called items, such that the system can also sell e.g. merchandise * Tickets are only an instance of an abstract model called items, such that the system can also sell e.g. merchandise
* An abstract concept of restriction is used to restrict the selling of tickets, for example by date, by number or by user permissions. * An abstract concept of restriction is used to restrict the selling of tickets, for example by date, by number or by user permissions.

View File

@@ -24,12 +24,18 @@ pretix/
Django or installed 3rd-party packages, like a filter to combine the ``lessc`` Django or installed 3rd-party packages, like a filter to combine the ``lessc``
preprocessor with ``django-compressor``'s URL rewriting. preprocessor with ``django-compressor``'s URL rewriting.
tests/
This is the root directory for all test codes. It includes subdirectories ``base``,
``control``, ``presale``, ``helpers`` and ``plugins`` to mirror the structure of the
``pretix`` source code as well as ``testdummy``, which is a pretix plugin used during
testing.
Language files Language files
-------------- --------------
The language files live in ``locale/*/LC_MESSAGES/``. The language files live in ``locale/*/LC_MESSAGES/``.
Static files Static files
------------- ------------
LESS source code LESS source code
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^

View File

@@ -1,10 +1,5 @@
.. 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 pretix's documentation! Welcome to pretix's documentation!
================================ ==================================
Contents: Contents:

View File

@@ -123,12 +123,14 @@ class User(AbstractBaseUser, PermissionsMixin):
This is the user model used by pretix for authentication. This is the user model used by pretix for authentication.
Handling users is somehow complicated, as we try to have two Handling users is somehow complicated, as we try to have two
classes of users in one system: classes of users in one system:
(1) We want *global* users who can just login into pretix and (1) We want *global* users who can just login into pretix and
buy tickets for multiple events -- we also need those buy tickets for multiple events -- we also need those
global users for event organizers who should not need global users for event organizers who should not need
multiple users for managing multiple events. multiple users for managing multiple events.
(2) We want *local* users who exist only in the scope of a (2) We want *local* users who exist only in the scope of a
certain event certain event
The hard part is to find a primary key to identify all of these The hard part is to find a primary key to identify all of these
users. Letting the users choose usernames is a bad idea, as users. Letting the users choose usernames is a bad idea, as
the primary key needs to be unique and there is no reason for a the primary key needs to be unique and there is no reason for a
@@ -139,11 +141,13 @@ class User(AbstractBaseUser, PermissionsMixin):
to supply an e-mail address. to supply an e-mail address.
Therefore, we use an abstract "identifier" field as the primary Therefore, we use an abstract "identifier" field as the primary
key. The identifier is: key. The identifier is:
(1) the e-mail address for global users. An e-mail address (1) the e-mail address for global users. An e-mail address
is and should be required for them and global users use is and should be required for them and global users use
their e-mail address for login. their e-mail address for login.
(2) "{username}@{event.identity}.event.pretix" for local users, who (2) "{username}@{event.identity}.event.pretix" for local users, who
use their username to login on the event page. use their username to login on the event page.
The model's save() method automatically fills the identifier field The model's save() method automatically fills the identifier field
according to this scheme when it is empty. The __str__() method according to this scheme when it is empty. The __str__() method
returns the identifier. returns the identifier.
@@ -1342,8 +1346,8 @@ class Quota(Versionable):
This method is used to determine whether Items or ItemVariations belonging This method is used to determine whether Items or ItemVariations belonging
to this quota should currently be available for sale. to this quota should currently be available for sale.
:returns: a tuple where the first entry is one of the Quota.AVAILABILITY_ constants and the second :returns: a tuple where the first entry is one of the ``Quota.AVAILABILITY_`` constants
is the number of available tickets. and the second is the number of available tickets.
""" """
# TODO: These lookups are highly inefficient. However, we'll wait with optimizing # TODO: These lookups are highly inefficient. However, we'll wait with optimizing
# until Django 1.8 is released, as the following feature might make it a # until Django 1.8 is released, as the following feature might make it a
@@ -1397,7 +1401,8 @@ class Quota(Versionable):
Issue a lock on this quota so nobody can take tickets from this quota until Issue a lock on this quota so nobody can take tickets from this quota until
you release the lock. Will retry 5 times on failure. you release the lock. Will retry 5 times on failure.
:raises Quota.LockTimeoutException: if the quota is locked every time we try to obtain the lock :raises Quota.LockTimeoutException: if the quota is locked every time we try
to obtain the lock
""" """
retries = 5 retries = 5
for i in range(retries): for i in range(retries):