equal
deleted
inserted
replaced
20 '"Pawel Solyga" <pawel.solyga@gmail.com>', |
20 '"Pawel Solyga" <pawel.solyga@gmail.com>', |
21 '"Todd Larsen" <tlarsen@google.com>', |
21 '"Todd Larsen" <tlarsen@google.com>', |
22 ] |
22 ] |
23 |
23 |
24 |
24 |
25 import polymodel |
|
26 |
|
27 from google.appengine.ext import db |
25 from google.appengine.ext import db |
28 |
26 |
29 from django.utils.translation import ugettext_lazy |
27 from django.utils.translation import ugettext_lazy |
30 |
28 |
31 import soc.models.document |
29 import soc.models.document |
|
30 import soc.models.linkable |
32 |
31 |
33 |
32 |
34 class HomeSettings(polymodel.PolyModel): |
33 class HomeSettings(soc.models.linkable.Linkable): |
35 """Model that stores settings for various Home pages. |
34 """Model that stores settings for various Home pages. |
36 |
35 |
37 This Model is the basis for more specific "/home" view settings, such as |
36 This Model is the basis for more specific "/home" view settings, such as |
38 SiteSettings, ProgramSettings, etc. |
37 SiteSettings, ProgramSettings, etc. |
39 """ |
38 """ |
49 #: on the site page using Google's JavaScript blog widget |
48 #: on the site page using Google's JavaScript blog widget |
50 feed_url = db.LinkProperty(verbose_name=ugettext_lazy('Feed URL')) |
49 feed_url = db.LinkProperty(verbose_name=ugettext_lazy('Feed URL')) |
51 feed_url.help_text = ugettext_lazy( |
50 feed_url.help_text = ugettext_lazy( |
52 'The URL should be a valid ATOM or RSS feed. ' |
51 'The URL should be a valid ATOM or RSS feed. ' |
53 'Feed entries are shown on the home page.') |
52 'Feed entries are shown on the home page.') |
54 |
|
55 #: Required path, prepended to a "link ID" to form the Setting URL. |
|
56 scope_path = db.StringProperty(required=True, |
|
57 verbose_name=ugettext_lazy('Settings scope path')) |
|
58 scope_path.help_text = ugettext_lazy( |
|
59 'path portion of URLs for Settings, prepended to link ID') |
|
60 |
|
61 #: Required link ID, appended to a "path" to form the Setting URL. |
|
62 link_id = db.StringProperty(required=True, |
|
63 verbose_name=ugettext_lazy('Setttings link ID')) |
|
64 link_id.help_text = ugettext_lazy('link ID for Settings used in URLs') |
|