author | Sverre Rabbelier <srabbelier@gmail.com> |
Sat, 06 Dec 2008 14:25:24 +0000 | |
changeset 682 | 187f4d95fedb |
parent 562 | 1bf2beedda03 |
child 915 | 27c656c01591 |
permissions | -rw-r--r-- |
495
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/python2.5 |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
2 |
# |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
3 |
# Copyright 2008 the Melange authors. |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
4 |
# |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
6 |
# you may not use this file except in compliance with the License. |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
7 |
# You may obtain a copy of the License at |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
8 |
# |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
10 |
# |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
11 |
# Unless required by applicable law or agreed to in writing, software |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
14 |
# See the License for the specific language governing permissions and |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
15 |
# limitations under the License. |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
16 |
|
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
17 |
"""This module contains the Request Model.""" |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
18 |
|
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
19 |
__authors__ = [ |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
20 |
'"Sverre Rabbelier" <sverre@rabbelier.nl>', |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
21 |
] |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
22 |
|
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
23 |
|
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
24 |
from google.appengine.ext import db |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
25 |
|
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
26 |
from django.utils.translation import ugettext_lazy |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
27 |
|
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
28 |
import soc.models.user |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
29 |
import soc.models.group |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
30 |
|
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
31 |
|
533
ba3309b2fd30
Move LINK_ID and SCOPE_PATH regular expressions to soc/models/linkable.py.
Todd Larsen <tlarsen@google.com>
parents:
495
diff
changeset
|
32 |
class Request(soc.models.linkable.Linkable): |
495
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
33 |
"""A request is made to allow a person to create a new Role entity. |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
34 |
""" |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
35 |
|
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
36 |
role = db.StringProperty() |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
37 |
role.help_text = ugettext_lazy( |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
38 |
'This should be the type of the role that is requested') |
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
39 |
|
562
1bf2beedda03
Made Request use the new link_id and scope_path
Sverre Rabbelier <srabbelier@gmail.com>
parents:
533
diff
changeset
|
40 |
group_accepted = db.BooleanProperty() |
1bf2beedda03
Made Request use the new link_id and scope_path
Sverre Rabbelier <srabbelier@gmail.com>
parents:
533
diff
changeset
|
41 |
group_accepted.help_text = ugettext_lazy( |
1bf2beedda03
Made Request use the new link_id and scope_path
Sverre Rabbelier <srabbelier@gmail.com>
parents:
533
diff
changeset
|
42 |
'Field used to indicate whether a request has been accepted by the group') |
495
87afae6e4c51
Added basic 'invite' functionality
Sverre Rabbelier <srabbelier@gmail.com>
parents:
diff
changeset
|
43 |
|
562
1bf2beedda03
Made Request use the new link_id and scope_path
Sverre Rabbelier <srabbelier@gmail.com>
parents:
533
diff
changeset
|
44 |
user_accepted = db.BooleanProperty() |
1bf2beedda03
Made Request use the new link_id and scope_path
Sverre Rabbelier <srabbelier@gmail.com>
parents:
533
diff
changeset
|
45 |
user_accepted.help_text = ugettext_lazy( |
1bf2beedda03
Made Request use the new link_id and scope_path
Sverre Rabbelier <srabbelier@gmail.com>
parents:
533
diff
changeset
|
46 |
'Field used to indicate that a request has been accepted by the user') |