author | Pawel Solyga <Pawel.Solyga@gmail.com> |
Wed, 04 Mar 2009 20:47:34 +0000 | |
changeset 1647 | 8bbe06730867 |
parent 1567 | b5589e656ed1 |
child 1704 | b581fdfd6bb1 |
permissions | -rw-r--r-- |
181
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/python2.5 |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
2 |
# |
1308
35b75ffcbb37
Partially reverted "Update the copyright notice for 2009."
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1307
diff
changeset
|
3 |
# Copyright 2008 the Melange authors. |
181
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
4 |
# |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
6 |
# you may not use this file except in compliance with the License. |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
7 |
# You may obtain a copy of the License at |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
8 |
# |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
10 |
# |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
11 |
# Unless required by applicable law or agreed to in writing, software |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
14 |
# See the License for the specific language governing permissions and |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
15 |
# limitations under the License. |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
16 |
|
775
d18d286df40f
Fixed missing import in soc/models/organization.py.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
773
diff
changeset
|
17 |
"""This module contains the Organization Model. |
d18d286df40f
Fixed missing import in soc/models/organization.py.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
773
diff
changeset
|
18 |
""" |
181
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
19 |
|
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
20 |
__authors__ = [ |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
21 |
'"Pawel Solyga" <pawel.solyga@gmail.com>', |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
22 |
] |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
23 |
|
316
9efdc7bc3565
Add missing blank lines between imports and sort all of the imports.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
244
diff
changeset
|
24 |
|
775
d18d286df40f
Fixed missing import in soc/models/organization.py.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
773
diff
changeset
|
25 |
from google.appengine.ext import db |
d18d286df40f
Fixed missing import in soc/models/organization.py.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
773
diff
changeset
|
26 |
|
970
8b5611d5b053
Use ugettext instead of ugettext_lazy
Sverre Rabbelier <srabbelier@gmail.com>
parents:
883
diff
changeset
|
27 |
from django.utils.translation import ugettext |
775
d18d286df40f
Fixed missing import in soc/models/organization.py.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
773
diff
changeset
|
28 |
|
181
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
29 |
import soc.models.group |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
30 |
|
316
9efdc7bc3565
Add missing blank lines between imports and sort all of the imports.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
244
diff
changeset
|
31 |
|
208
e076aee6e90f
Take advantage of the Model inheritance provided by polymodel.PolyModel to
Todd Larsen <tlarsen@google.com>
parents:
181
diff
changeset
|
32 |
class Organization(soc.models.group.Group): |
181
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
33 |
"""Organization details. |
fdd29818a954
Remove Author model (use Person instead). Update models after removing Author. Add new Sponsor, Organization models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
34 |
""" |
1322
5153bd89147f
Add an idea list (url) property to organization
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1308
diff
changeset
|
35 |
|
772
a91f7856754e
Add IRC channel and mailing list properties to the Group and Organization
Todd Larsen <tlarsen@google.com>
parents:
748
diff
changeset
|
36 |
#: Optional development mailing list. |
773
fefaf4628a4d
Mailing list EmailProperty should be StringProperty instead, so that it is
Todd Larsen <tlarsen@google.com>
parents:
772
diff
changeset
|
37 |
dev_mailing_list = db.StringProperty(required=False, |
970
8b5611d5b053
Use ugettext instead of ugettext_lazy
Sverre Rabbelier <srabbelier@gmail.com>
parents:
883
diff
changeset
|
38 |
verbose_name=ugettext('Development Mailing List')) |
8b5611d5b053
Use ugettext instead of ugettext_lazy
Sverre Rabbelier <srabbelier@gmail.com>
parents:
883
diff
changeset
|
39 |
dev_mailing_list.help_text = ugettext( |
772
a91f7856754e
Add IRC channel and mailing list properties to the Group and Organization
Todd Larsen <tlarsen@google.com>
parents:
748
diff
changeset
|
40 |
'Mailing list email address, URL to sign-up page, etc.') |
1322
5153bd89147f
Add an idea list (url) property to organization
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1308
diff
changeset
|
41 |
|
1567
b5589e656ed1
Member template in organization is now called Contributor Template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1408
diff
changeset
|
42 |
contrib_template = db.TextProperty(required=False, verbose_name=ugettext( |
b5589e656ed1
Member template in organization is now called Contributor Template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1408
diff
changeset
|
43 |
'Application template')) |
b5589e656ed1
Member template in organization is now called Contributor Template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1408
diff
changeset
|
44 |
contrib_template.help_text = ugettext( |
b5589e656ed1
Member template in organization is now called Contributor Template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1408
diff
changeset
|
45 |
'This template can be used by contributors, such as students' |
b5589e656ed1
Member template in organization is now called Contributor Template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1408
diff
changeset
|
46 |
' and other non-member participants, when they apply to contribute' |
b5589e656ed1
Member template in organization is now called Contributor Template.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
1408
diff
changeset
|
47 |
' to the organization.') |
772
a91f7856754e
Add IRC channel and mailing list properties to the Group and Organization
Todd Larsen <tlarsen@google.com>
parents:
748
diff
changeset
|
48 |
|
1322
5153bd89147f
Add an idea list (url) property to organization
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1308
diff
changeset
|
49 |
ideas = db.LinkProperty(required=False, verbose_name=ugettext('Idea list')) |
5153bd89147f
Add an idea list (url) property to organization
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1308
diff
changeset
|
50 |
ideas.help_text = ugettext( |
5153bd89147f
Add an idea list (url) property to organization
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1308
diff
changeset
|
51 |
'The URL to the ideas list of your organization.') |
5153bd89147f
Add an idea list (url) property to organization
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1308
diff
changeset
|
52 |
ideas.example_text = ugettext('For instance a link to a Melange public ' |
5153bd89147f
Add an idea list (url) property to organization
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1308
diff
changeset
|
53 |
'document or some other URL') |