app/ghop/models/timeline.py
author Pawel Solyga <Pawel.Solyga@gmail.com>
Wed, 27 May 2009 01:47:38 +0200
changeset 2360 e389d26949db
parent 2347 c5a397f57d65
permissions -rw-r--r--
Style and pylint fixes in Melange modules.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2347
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/python2.5
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
     2
#
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
     3
# Copyright 2009 the Melange authors.
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
     4
#
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
     5
# Licensed under the Apache License, Version 2.0 (the "License");
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
     6
# you may not use this file except in compliance with the License.
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
     7
# You may obtain a copy of the License at
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
     8
#
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
     9
#   http://www.apache.org/licenses/LICENSE-2.0
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    10
#
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    11
# Unless required by applicable law or agreed to in writing, software
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    12
# distributed under the License is distributed on an "AS IS" BASIS,
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    14
# See the License for the specific language governing permissions and
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    15
# limitations under the License.
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    16
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    17
"""This module contains the GHOP specific Timeline Model.
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    18
"""
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    19
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    20
__authors__ = [
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    21
  '"Madhusudan.C.S" <madhusudancs@gmail.com>',
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    22
]
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    23
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    24
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    25
from google.appengine.ext import db
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    26
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    27
from django.utils.translation import ugettext
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    28
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    29
import soc.models.timeline
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    30
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    31
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    32
class GHOPTimeline(soc.models.timeline.Timeline):
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    33
  """GHOP Timeline model extends the basic Timeline model. It implements
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    34
     the GHOP specific timeline entries.
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    35
  """
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    36
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    37
  task_claim_deadline = db.DateTimeProperty(
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    38
      verbose_name=ugettext('Task Claim Deadline date'))
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    39
  task_claim_deadline.help_text = ugettext(
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    40
      'No tasks can be claimed after this date.'
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    41
      'Work on claimed tasks can continue.')
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    42
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    43
  stop_all_work = db.DateTimeProperty(
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    44
      verbose_name=ugettext('Work Submission Deadline date'))
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    45
  stop_all_work.help_text = ugettext(
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    46
      'All work must stop by this date.')
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    47
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    48
  winner_selection_start = db.DateTimeProperty(
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    49
      verbose_name=ugettext('Winner Selection Start date'))
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    50
  winner_selection_start.help_text = ugettext(
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    51
      'Organizations start choosing their winners.')
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    52
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    53
  winner_selection_end = db.DateTimeProperty(
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    54
      verbose_name=ugettext('Winner Selection End date'))
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    55
  winner_selection_end.help_text = ugettext(
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    56
      'Organizations must have completed choosing their winners.')
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    57
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    58
  winner_announcement = db.DateTimeProperty(
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    59
      verbose_name=ugettext('Winner Announcement date'))
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    60
  winner_announcement.help_text = ugettext(
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    61
      'All winners are announced.')
c5a397f57d65 Added several models related to the GHOP workflow.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff changeset
    62