app/soc/models/timeline.py
author Sverre Rabbelier <srabbelier@gmail.com>
Tue, 06 Jan 2009 16:55:27 +0000
changeset 766 046b4b51eabf
parent 765 a0a4cbd7693b
child 771 0b1beae179f5
permissions -rw-r--r--
Made Program reference Timeline Also made Timeline inherit from base like it should. Patch by: Sverre Rabbelier
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
764
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/python2.5
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     2
#
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     3
# Copyright 2008 the Melange authors.
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     4
#
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     5
# Licensed under the Apache License, Version 2.0 (the "License");
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     6
# you may not use this file except in compliance with the License.
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     7
# You may obtain a copy of the License at
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     8
#
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
     9
#   http://www.apache.org/licenses/LICENSE-2.0
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    10
#
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    11
# Unless required by applicable law or agreed to in writing, software
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    12
# distributed under the License is distributed on an "AS IS" BASIS,
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    14
# See the License for the specific language governing permissions and
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    15
# limitations under the License.
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    16
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    17
"""This module contains the Timeline Model."""
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    18
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    19
__authors__ = [
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    20
  '"Sverre Rabbelier" <sverre@rabbelier.nl>',
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    21
]
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    22
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    23
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    24
from google.appengine.ext import db
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    25
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    26
from django.utils.translation import ugettext_lazy
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    27
766
046b4b51eabf Made Program reference Timeline
Sverre Rabbelier <srabbelier@gmail.com>
parents: 765
diff changeset
    28
from soc.models import base
764
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    29
766
046b4b51eabf Made Program reference Timeline
Sverre Rabbelier <srabbelier@gmail.com>
parents: 765
diff changeset
    30
046b4b51eabf Made Program reference Timeline
Sverre Rabbelier <srabbelier@gmail.com>
parents: 765
diff changeset
    31
class Timeline(base.ModelWithFieldAttributes):
764
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    32
  """The Timeline Model, representing the timeline for a Program.
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    33
  """
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    34
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    35
  program_start_data = db.DateTimeProperty(
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    36
      verbose_name=ugettext_lazy('Program Start date'))
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    37
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    38
  program_end_data = db.DateTimeProperty(
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    39
      verbose_name=ugettext_lazy('Program End date'))
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    40
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    41
  org_signup_start = db.DateTimeProperty(
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    42
      verbose_name=ugettext_lazy('Organization Signup Start date'))
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    43
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    44
  org_signup_end  = db.DateTimeProperty(
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    45
      verbose_name=ugettext_lazy('Organization Signup End date'))
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    46
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    47
  student_signup_start  = db.DateTimeProperty(
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    48
      verbose_name=ugettext_lazy('Student Signup Start date'))
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    49
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    50
  student_signup_end = db.DateTimeProperty(
e0293fa7b342 Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff changeset
    51
      verbose_name=ugettext_lazy('Student Signup End date'))