author | Daniel Diniz <ajaksu@gmail.com> |
Mon, 06 Jul 2009 16:13:27 +0200 | |
changeset 2560 | a944c0169ad8 |
parent 2072 | eb4565a8e5b4 |
permissions | -rw-r--r-- |
1051
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/python2.5 |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
2 |
# |
1307
091a21cf3627
Update the copyright notice for 2009.
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1053
diff
changeset
|
3 |
# Copyright 2009 the Melange authors. |
1051
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
4 |
# |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
6 |
# you may not use this file except in compliance with the License. |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
7 |
# You may obtain a copy of the License at |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
8 |
# |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
10 |
# |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
11 |
# Unless required by applicable law or agreed to in writing, software |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
14 |
# See the License for the specific language governing permissions and |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
15 |
# limitations under the License. |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
16 |
|
1053
3b9552cf748a
Rename the confusing Tossed Model class to PresenceWithToS.
Todd Larsen <tlarsen@google.com>
parents:
1051
diff
changeset
|
17 |
"""PresenceWithToS (Model) query functions. |
1051
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
18 |
""" |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
19 |
|
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
20 |
__authors__ = [ |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
21 |
'"Sverre Rabbelier" <sverre@rabbelier.nl>', |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
22 |
] |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
23 |
|
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
24 |
|
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
25 |
from soc.logic.models import presence |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
26 |
|
1053
3b9552cf748a
Rename the confusing Tossed Model class to PresenceWithToS.
Todd Larsen <tlarsen@google.com>
parents:
1051
diff
changeset
|
27 |
import soc.models.presence_with_tos |
1051
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
28 |
|
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
29 |
|
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
30 |
class Logic(presence.Logic): |
1053
3b9552cf748a
Rename the confusing Tossed Model class to PresenceWithToS.
Todd Larsen <tlarsen@google.com>
parents:
1051
diff
changeset
|
31 |
"""Logic methods for the PresenceWithToS model. |
1051
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
32 |
""" |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
33 |
|
1053
3b9552cf748a
Rename the confusing Tossed Model class to PresenceWithToS.
Todd Larsen <tlarsen@google.com>
parents:
1051
diff
changeset
|
34 |
def __init__(self, model=soc.models.presence_with_tos.PresenceWithToS, |
2072
eb4565a8e5b4
Style fixes and removal of unused imports in soc.logic.models modules.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
1307
diff
changeset
|
35 |
base_model=None, scope_logic=presence): |
1051
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
36 |
"""Defines the name, key_name and model for this entity. |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
37 |
""" |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
38 |
|
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
39 |
super(Logic, self).__init__(model=model, base_model=base_model, |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
40 |
scope_logic=scope_logic) |
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
41 |
|
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
42 |
|
c532dd9def48
Create a new Tossed layer in the MVC
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
43 |
logic = Logic() |