author | Todd Larsen <tlarsen@google.com> |
Tue, 20 Jan 2009 20:16:07 +0000 | |
changeset 845 | 255faade3e30 |
parent 776 | f86a76f52bf4 |
child 970 | 8b5611d5b053 |
permissions | -rw-r--r-- |
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 |
|
771
0b1beae179f5
Typo and style fixes.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
766
diff
changeset
|
17 |
"""This module contains the Timeline Model. |
0b1beae179f5
Typo and style fixes.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
766
diff
changeset
|
18 |
""" |
764
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
19 |
|
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
20 |
__authors__ = [ |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
21 |
'"Sverre Rabbelier" <sverre@rabbelier.nl>', |
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 |
|
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
25 |
from google.appengine.ext import db |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
26 |
|
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
27 |
from django.utils.translation import ugettext_lazy |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
28 |
|
766
046b4b51eabf
Made Program reference Timeline
Sverre Rabbelier <srabbelier@gmail.com>
parents:
765
diff
changeset
|
29 |
from soc.models import base |
764
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
30 |
|
766
046b4b51eabf
Made Program reference Timeline
Sverre Rabbelier <srabbelier@gmail.com>
parents:
765
diff
changeset
|
31 |
|
046b4b51eabf
Made Program reference Timeline
Sverre Rabbelier <srabbelier@gmail.com>
parents:
765
diff
changeset
|
32 |
class Timeline(base.ModelWithFieldAttributes): |
764
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
33 |
"""The Timeline Model, representing the timeline for a Program. |
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 |
|
776
f86a76f52bf4
Started on edit timeline
Sverre Rabbelier <srabbelier@gmail.com>
parents:
771
diff
changeset
|
36 |
scope_path = db.StringProperty(required=True, |
f86a76f52bf4
Started on edit timeline
Sverre Rabbelier <srabbelier@gmail.com>
parents:
771
diff
changeset
|
37 |
verbose_name=ugettext_lazy('Scope Path')) |
f86a76f52bf4
Started on edit timeline
Sverre Rabbelier <srabbelier@gmail.com>
parents:
771
diff
changeset
|
38 |
|
771
0b1beae179f5
Typo and style fixes.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
766
diff
changeset
|
39 |
program_start = db.DateTimeProperty( |
764
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
40 |
verbose_name=ugettext_lazy('Program Start date')) |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
41 |
|
771
0b1beae179f5
Typo and style fixes.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
766
diff
changeset
|
42 |
program_end = db.DateTimeProperty( |
764
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
43 |
verbose_name=ugettext_lazy('Program End date')) |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
44 |
|
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
45 |
org_signup_start = db.DateTimeProperty( |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
46 |
verbose_name=ugettext_lazy('Organization Signup Start date')) |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
47 |
|
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
48 |
org_signup_end = db.DateTimeProperty( |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
49 |
verbose_name=ugettext_lazy('Organization Signup End date')) |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
50 |
|
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
51 |
student_signup_start = db.DateTimeProperty( |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
52 |
verbose_name=ugettext_lazy('Student Signup Start date')) |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
53 |
|
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
54 |
student_signup_end = db.DateTimeProperty( |
e0293fa7b342
Added a basic Timeline model
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
55 |
verbose_name=ugettext_lazy('Student Signup End date')) |