author | Daniel Hans <Daniel.M.Hans@gmail.com> |
Mon, 02 Nov 2009 23:38:43 +0100 | |
changeset 3074 | ebda36efbd61 |
parent 2407 | e23fce20ad3a |
permissions | -rw-r--r-- |
2401
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/python2.5 |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
2 |
# |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
3 |
# Copyright 2009 the Melange authors. |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
4 |
# |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
6 |
# you may not use this file except in compliance with the License. |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
7 |
# You may obtain a copy of the License at |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
8 |
# |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
10 |
# |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
11 |
# Unless required by applicable law or agreed to in writing, software |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
14 |
# See the License for the specific language governing permissions and |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
15 |
# limitations under the License. |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
16 |
|
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
17 |
"""GHOPOrganization (Model) query functions. |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
18 |
""" |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
19 |
|
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
20 |
__authors__ = [ |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
21 |
'"Madhusudan.C.S" <madhusudancs@gmail.com>' |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
22 |
] |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
23 |
|
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
24 |
|
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
25 |
from soc.logic.models import organization |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
26 |
|
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
27 |
import soc.models.organization |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
28 |
|
2407
e23fce20ad3a
Changed GHOP module imports to be consistent with rest of Melange code.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
2401
diff
changeset
|
29 |
import soc.modules.ghop.logic.models.program |
e23fce20ad3a
Changed GHOP module imports to be consistent with rest of Melange code.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
2401
diff
changeset
|
30 |
import soc.modules.ghop.models.organization |
2401
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
31 |
|
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
32 |
|
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
33 |
class Logic(organization.Logic): |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
34 |
"""Logic methods for the GHOPOrganization model. |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
35 |
""" |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
36 |
|
2407
e23fce20ad3a
Changed GHOP module imports to be consistent with rest of Melange code.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
2401
diff
changeset
|
37 |
def __init__( |
e23fce20ad3a
Changed GHOP module imports to be consistent with rest of Melange code.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
2401
diff
changeset
|
38 |
self, model=soc.modules.ghop.models.organization.GHOPOrganization, |
e23fce20ad3a
Changed GHOP module imports to be consistent with rest of Melange code.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
2401
diff
changeset
|
39 |
base_model=soc.models.organization.Organization, |
e23fce20ad3a
Changed GHOP module imports to be consistent with rest of Melange code.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
2401
diff
changeset
|
40 |
scope_logic=soc.modules.ghop.logic.models.program): |
2401
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
41 |
"""Defines the name, key_name and model for this entity. |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
42 |
""" |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
43 |
|
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
44 |
super(Logic, self).__init__(model, base_model=base_model, |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
45 |
scope_logic=scope_logic) |
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
46 |
|
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
47 |
|
bf70c5a0ef66
Added logic for every GHOP specific model.
Madhusudan C.S. <madhusudancs@gmail.com>
parents:
diff
changeset
|
48 |
logic = Logic() |