author | Pawel Solyga <Pawel.Solyga@gmail.com> |
Tue, 04 Nov 2008 14:09:37 +0000 | |
changeset 441 | 8a7110ad3d82 |
parent 436 | f3c313d54aa4 |
child 443 | 94568ac6e3e1 |
permissions | -rw-r--r-- |
334
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/python2.5 |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
2 |
# |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
3 |
# Copyright 2008 the Melange authors. |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
4 |
# |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
6 |
# you may not use this file except in compliance with the License. |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
7 |
# You may obtain a copy of the License at |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
8 |
# |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
10 |
# |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
11 |
# Unless required by applicable law or agreed to in writing, software |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
14 |
# See the License for the specific language governing permissions and |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
15 |
# limitations under the License. |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
16 |
|
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
17 |
"""HomeSettings (Model) query functions. |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
18 |
""" |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
19 |
|
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
20 |
__authors__ = [ |
429
e50e18936f06
Fixed typo in e-mail address
Sverre Rabbelier <srabbelier@gmail.com>
parents:
334
diff
changeset
|
21 |
'"Sverre Rabbelier" <sverre@rabbelier.nl>', |
334
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
22 |
] |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
23 |
|
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
24 |
|
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
25 |
from soc.logic import key_name |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
26 |
from soc.logic.models import base |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
27 |
|
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
28 |
import soc.models.home_settings |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
29 |
|
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
30 |
|
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
31 |
class Logic(base.Logic): |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
32 |
"""Logic methods for the HomeSettings model |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
33 |
""" |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
34 |
|
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
35 |
def __init__(self): |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
36 |
"""Defines the name, key_name and model for this entity. |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
37 |
""" |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
38 |
|
432
1851d67a1004
Add a generic method for getting a Keyname
Sverre Rabbelier <srabbelier@gmail.com>
parents:
429
diff
changeset
|
39 |
self._name = "HomeSettings" |
334
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
40 |
self._model = soc.models.home_settings.HomeSettings |
436
f3c313d54aa4
Add missing TODOs to soc.logic.models classes. Fix comments format in base.Logic class. Changes based on comments to r972.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
432
diff
changeset
|
41 |
# TODO: remove line below when HomeSettings is implemented using |
f3c313d54aa4
Add missing TODOs to soc.logic.models classes. Fix comments format in base.Logic class. Changes based on comments to r972.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
432
diff
changeset
|
42 |
# views.models.base.View approach |
334
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
43 |
self._keyName = key_name.nameHomeSettings |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
44 |
self._skip_properties = [] |
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
45 |
|
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
46 |
|
0d0e96b12551
Add nameHomeSettings function to key_name module. Add HomeSettings logic.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
47 |
logic = Logic() |