app/soc/logic/models/student_proposal.py
author Sverre Rabbelier <srabbelier@gmail.com>
Tue, 24 Feb 2009 12:52:19 +0000
changeset 1479 bc738f92a4d8
parent 1422 052218c51035
child 1610 6f675b690f92
permissions -rw-r--r--
Fix the user editing Noticed by: Lennard de Rijk Patch by: Sverre Rabbelier
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1422
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/python2.5
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     2
#
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     3
# Copyright 2009 the Melange authors.
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     4
#
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     5
# Licensed under the Apache License, Version 2.0 (the "License");
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     6
# you may not use this file except in compliance with the License.
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     7
# You may obtain a copy of the License at
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     8
#
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     9
#   http://www.apache.org/licenses/LICENSE-2.0
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    10
#
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    11
# Unless required by applicable law or agreed to in writing, software
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    12
# distributed under the License is distributed on an "AS IS" BASIS,
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    14
# See the License for the specific language governing permissions and
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    15
# limitations under the License.
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    16
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    17
"""Student Proposal (Model) query functions.
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    18
"""
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    19
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    20
__authors__ = [
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    21
  '"Lennard de Rijk" <ljvderijk@gmail.com>',
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    22
  ]
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    23
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    24
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    25
from soc.logic.models import base
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    26
from soc.logic.models import student as student_logic
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    27
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    28
import soc.models.linkable
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    29
import soc.models.student_proposal
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    30
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    31
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    32
class Logic(base.Logic):
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    33
  """Logic methods for the Student Proposal model.
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    34
  """
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    35
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    36
  def __init__(self, model=soc.models.student_proposal.StudentProposal,
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    37
               base_model=soc.models.linkable.Linkable, scope_logic=student_logic):
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    38
    """Defines the name, key_name and model for this entity.
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    39
    """
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    40
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    41
    super(Logic, self).__init__(model=model, base_model=base_model,
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    42
                                scope_logic=scope_logic)
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    43
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    44
052218c51035 Added student_proposal logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    45
logic = Logic()