app/soc/logic/models/club.py
author Sverre Rabbelier <srabbelier@gmail.com>
Thu, 08 Jan 2009 21:24:27 +0000
changeset 791 30da180c4bca
parent 782 27924b0f13cd
child 801 06a84103ed8b
permissions -rw-r--r--
Added the club_app view, logic and model Patch by: Sverre Rabbelier
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
782
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/python2.5
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     2
#
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     3
# Copyright 2008 the Melange authors.
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     4
#
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     5
# Licensed under the Apache License, Version 2.0 (the "License");
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     6
# you may not use this file except in compliance with the License.
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     7
# You may obtain a copy of the License at
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     8
#
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     9
#   http://www.apache.org/licenses/LICENSE-2.0
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    10
#
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    11
# Unless required by applicable law or agreed to in writing, software
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    12
# distributed under the License is distributed on an "AS IS" BASIS,
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    14
# See the License for the specific language governing permissions and
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    15
# limitations under the License.
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    16
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    17
"""Club (Model) query functions.
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    18
"""
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    19
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    20
__authors__ = [
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    21
  '"Lennard de Rijk" <ljvderijk@gmail.com>',
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    22
  ]
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    23
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    24
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    25
from soc.logic.models import group
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    26
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    27
import soc.models.club
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    28
import soc.models.group
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    29
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    30
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    31
class Logic(group.Logic):
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    32
  """Logic methods for the Club model.
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    33
  """
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    34
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    35
  def __init__(self, model=soc.models.club.Club,
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    36
               base_model=soc.models.group, scope_logic=None):
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    37
    """Defines the name, key_name and model for this entity.
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    38
    """
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    39
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    40
    super(Logic, self).__init__(model, base_model=base_model,
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    41
                                scope_logic=scope_logic)
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    42
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    43
27924b0f13cd Fixed missing files in r1364.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    44
logic = Logic()