author | Todd Larsen <tlarsen@google.com> |
Sat, 15 Nov 2008 03:12:33 +0000 | |
changeset 481 | 94834a1e6c01 |
parent 477 | 8a8b1bd035c4 |
child 492 | 4abdeedfc08e |
permissions | -rw-r--r-- |
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/python2.5 |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
2 |
# |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
3 |
# Copyright 2008 the Melange authors. |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
4 |
# |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
6 |
# you may not use this file except in compliance with the License. |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
7 |
# You may obtain a copy of the License at |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
8 |
# |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
10 |
# |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
11 |
# Unless required by applicable law or agreed to in writing, software |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
14 |
# See the License for the specific language governing permissions and |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
15 |
# limitations under the License. |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
16 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
17 |
"""Site map information, used to generate sidebar menus, urlpatterns, etc. |
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
18 |
""" |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
19 |
|
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
20 |
__authors__ = [ |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
21 |
'"Todd Larsen" <tlarsen@google.com>', |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
22 |
] |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
23 |
|
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
24 |
|
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
25 |
from google.appengine.api import users |
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
26 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
27 |
from django.conf.urls import defaults |
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
28 |
|
377
d94ec6f104cc
Refactor various site views into more generic locations, in preparation for
Todd Larsen <tlarsen@google.com>
parents:
372
diff
changeset
|
29 |
from soc.logic import models |
305
972d28056d9d
Minor style and import fixes
Sverre Rabbelier <srabbelier@gmail.com>
parents:
299
diff
changeset
|
30 |
from soc.logic import path_link_name |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
31 |
from soc.logic.site import page |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
32 |
|
377
d94ec6f104cc
Refactor various site views into more generic locations, in preparation for
Todd Larsen <tlarsen@google.com>
parents:
372
diff
changeset
|
33 |
import soc.logic.models.site_settings |
d94ec6f104cc
Refactor various site views into more generic locations, in preparation for
Todd Larsen <tlarsen@google.com>
parents:
372
diff
changeset
|
34 |
|
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
35 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
36 |
# Home Page view |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
37 |
home = page.Page( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
38 |
page.Url( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
39 |
r'^$', |
446
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
40 |
'soc.views.models.site_settings.main_public'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
41 |
'Google Open Source Programs', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
42 |
# it should be obvious that every page comes from the home page |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
43 |
in_breadcrumb=False) |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
44 |
|
425
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
45 |
# User sub-menu, changes depending on if User is signed-in or not |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
46 |
user_signin_sub_menu = page.NonPage( |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
47 |
'user-sign-in-sub-menu', |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
48 |
'User', |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
49 |
parent=home) |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
50 |
|
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
51 |
user_signout_sub_menu = page.NonPage( |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
52 |
'user-sign-out-sub-menu', |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
53 |
'User', |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
54 |
parent=home) |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
55 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
56 |
# User authentication view placeholders |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
57 |
# (these are not real Django views, but need to appear in menus, etc.) |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
58 |
user_signin = page.Page( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
59 |
page.Url( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
60 |
# not a real Django URL regex, just a unique placeholder |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
61 |
users.create_login_url('/'), |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
62 |
# no view, since App Engine handles this page |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
63 |
# (this page will not be placed in urlpatterns) |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
64 |
None, |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
65 |
# name is alternate string for view when it is not unique |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
66 |
name='user-sign-in'), |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
67 |
'User (sign in)', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
68 |
link_url=users.create_login_url('/'), |
425
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
69 |
parent=user_signin_sub_menu) |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
70 |
|
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
71 |
user_signout = page.Page( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
72 |
page.Url( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
73 |
# not a real Django URL regex, just a unique placeholder |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
74 |
users.create_logout_url('/'), |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
75 |
# no view, since App Engine handles this page |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
76 |
# (this page will not be placed in urlpatterns) |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
77 |
None, |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
78 |
# name is alternate string for view when it is not unique |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
79 |
name='user-sign-out'), |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
80 |
'User (sign out)', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
81 |
link_url=users.create_logout_url('/'), |
425
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
82 |
parent=user_signout_sub_menu) |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
83 |
|
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
84 |
# User Profile views |
469
fc401778e380
Some name changes in soc.logic.site.map module for User self edit view.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
461
diff
changeset
|
85 |
user_edit_self = page.Page( |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
86 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
87 |
r'^user/edit$', |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
88 |
'soc.views.user.profile.create'), |
469
fc401778e380
Some name changes in soc.logic.site.map module for User self edit view.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
461
diff
changeset
|
89 |
'User: Edit Your User Profile', |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
90 |
short_name='Site-wide User Profile', |
425
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
91 |
parent=user_signout_sub_menu) |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
92 |
|
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
93 |
# Site Home Page views |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
94 |
site_home = page.Page( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
95 |
page.Url( |
446
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
96 |
r'^home$', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
97 |
'soc.views.models.site_settings.main_public'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
98 |
'Google Open Source Programs', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
99 |
# it should be obvious that every page comes from the home page |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
100 |
in_breadcrumb=False) |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
101 |
|
446
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
102 |
|
425
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
103 |
site_sub_menu = page.NonPage( |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
104 |
'site-sub-menu', |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
105 |
'Site', |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
106 |
parent=home) |
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
107 |
|
446
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
108 |
home_settings_sub_menu = page.NonPage( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
109 |
'home-settings-sub-menu', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
110 |
'Home Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
111 |
parent=site_sub_menu) |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
112 |
|
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
113 |
# Site Home Settings views |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
114 |
home_settings_list = page.Page( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
115 |
page.Url( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
116 |
r'^home/list$', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
117 |
'soc.views.models.home_settings.list'), |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
118 |
'Site: List Home Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
119 |
short_name='List Home Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
120 |
parent=home_settings_sub_menu) |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
121 |
|
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
122 |
home_settings_create = page.Page( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
123 |
page.Url( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
124 |
r'^home/create$', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
125 |
'soc.views.models.home_settings.create'), |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
126 |
'Site: Create New Home Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
127 |
short_name='Create Home Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
128 |
parent=home_settings_sub_menu) |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
129 |
|
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
130 |
home_settings_edit = page.Page( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
131 |
page.Url( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
132 |
r'^home/edit/%s$' % path_link_name.PATH_LINKNAME_ARGS_PATTERN, |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
133 |
'soc.views.models.home_settings.edit'), |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
134 |
'Site: Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
135 |
short_name='Edit Site Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
136 |
parent=home_settings_sub_menu) |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
137 |
|
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
138 |
home_settings_show = page.Page( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
139 |
page.Url( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
140 |
r'^home/show/%s$' % path_link_name.PATH_LINKNAME_ARGS_PATTERN, |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
141 |
'soc.views.models.home_settings.public'), |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
142 |
'Show Document', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
143 |
parent=home) |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
144 |
|
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
145 |
|
430
e7605c7753b1
Create a Site Settings sub-menu
Sverre Rabbelier <srabbelier@gmail.com>
parents:
425
diff
changeset
|
146 |
site_settings_sub_menu = page.NonPage( |
e7605c7753b1
Create a Site Settings sub-menu
Sverre Rabbelier <srabbelier@gmail.com>
parents:
425
diff
changeset
|
147 |
'site-settings-sub-menu', |
e7605c7753b1
Create a Site Settings sub-menu
Sverre Rabbelier <srabbelier@gmail.com>
parents:
425
diff
changeset
|
148 |
'Site Settings', |
e7605c7753b1
Create a Site Settings sub-menu
Sverre Rabbelier <srabbelier@gmail.com>
parents:
425
diff
changeset
|
149 |
parent=site_sub_menu) |
e7605c7753b1
Create a Site Settings sub-menu
Sverre Rabbelier <srabbelier@gmail.com>
parents:
425
diff
changeset
|
150 |
|
446
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
151 |
# Site Home Settings views |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
152 |
site_settings_list = page.Page( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
153 |
page.Url( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
154 |
r'^site/list$', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
155 |
'soc.views.models.site_settings.list'), |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
156 |
'Site: List Site Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
157 |
short_name='List Site Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
158 |
parent=site_settings_sub_menu) |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
159 |
|
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
160 |
site_settings_create = page.Page( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
161 |
page.Url( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
162 |
r'^site/create$', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
163 |
'soc.views.models.site_settings.create'), |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
164 |
'Site: Create New Site Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
165 |
short_name='Create Site Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
166 |
parent=site_settings_sub_menu) |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
167 |
|
347
52676c696cd4
First phase of making the / (site/home) view generic enough to use it for
Todd Larsen <tlarsen@google.com>
parents:
314
diff
changeset
|
168 |
site_settings_edit = page.Page( |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
169 |
page.Url( |
446
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
170 |
r'^site/edit$', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
171 |
'soc.views.models.site_settings.main_edit'), |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
172 |
'Site: Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
173 |
short_name='Edit Main Site Settings', |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
174 |
parent=site_settings_sub_menu) |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
175 |
|
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
176 |
site_settings_edit = page.Page( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
177 |
page.Url( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
178 |
r'^site/edit/%s$' % path_link_name.PATH_LINKNAME_ARGS_PATTERN, |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
179 |
'soc.views.models.site_settings.edit'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
180 |
'Site: Settings', |
430
e7605c7753b1
Create a Site Settings sub-menu
Sverre Rabbelier <srabbelier@gmail.com>
parents:
425
diff
changeset
|
181 |
short_name='Edit Site Settings', |
e7605c7753b1
Create a Site Settings sub-menu
Sverre Rabbelier <srabbelier@gmail.com>
parents:
425
diff
changeset
|
182 |
parent=site_settings_sub_menu) |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
183 |
|
446
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
184 |
site_settings_show = page.Page( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
185 |
page.Url( |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
186 |
r'^site/show/%s$' % path_link_name.PATH_LINKNAME_ARGS_PATTERN, |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
187 |
'soc.views.models.site_settings.public'), |
452
160c748988a2
Fixes to {Site,Home}Settings
Sverre Rabbelier <srabbelier@gmail.com>
parents:
446
diff
changeset
|
188 |
'Show Site Settings', |
160c748988a2
Fixes to {Site,Home}Settings
Sverre Rabbelier <srabbelier@gmail.com>
parents:
446
diff
changeset
|
189 |
parent=home) |
160c748988a2
Fixes to {Site,Home}Settings
Sverre Rabbelier <srabbelier@gmail.com>
parents:
446
diff
changeset
|
190 |
|
160c748988a2
Fixes to {Site,Home}Settings
Sverre Rabbelier <srabbelier@gmail.com>
parents:
446
diff
changeset
|
191 |
site_settings_delete = page.Page( |
160c748988a2
Fixes to {Site,Home}Settings
Sverre Rabbelier <srabbelier@gmail.com>
parents:
446
diff
changeset
|
192 |
page.Url( |
160c748988a2
Fixes to {Site,Home}Settings
Sverre Rabbelier <srabbelier@gmail.com>
parents:
446
diff
changeset
|
193 |
r'^site/delete/%s$' % path_link_name.PATH_LINKNAME_ARGS_PATTERN, |
160c748988a2
Fixes to {Site,Home}Settings
Sverre Rabbelier <srabbelier@gmail.com>
parents:
446
diff
changeset
|
194 |
'soc.views.models.site_settings.delete'), |
160c748988a2
Fixes to {Site,Home}Settings
Sverre Rabbelier <srabbelier@gmail.com>
parents:
446
diff
changeset
|
195 |
'Delete Site Settings', |
446
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
196 |
parent=home) |
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
197 |
|
0b479d573a4c
Refactoring of {site/home}_settings to make them use base.View
Sverre Rabbelier <srabbelier@gmail.com>
parents:
445
diff
changeset
|
198 |
|
461
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
199 |
# User views |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
200 |
user_sub_menu = page.NonPage( |
372
8595c1129c74
Formalize the concept of a NonPage that can appear in the site-map, useful for
Todd Larsen <tlarsen@google.com>
parents:
350
diff
changeset
|
201 |
'site-user-sub-menu', |
8595c1129c74
Formalize the concept of a NonPage that can appear in the site-map, useful for
Todd Larsen <tlarsen@google.com>
parents:
350
diff
changeset
|
202 |
'Site: Users Sub-Menu', |
349
bb82a1a3339c
A quick-and-dirty way to create non-link sub-menu dividers, plus a TODO on
Todd Larsen <tlarsen@google.com>
parents:
347
diff
changeset
|
203 |
short_name='Site Users', |
425
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
204 |
parent=site_sub_menu) |
349
bb82a1a3339c
A quick-and-dirty way to create non-link sub-menu dividers, plus a TODO on
Todd Larsen <tlarsen@google.com>
parents:
347
diff
changeset
|
205 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
206 |
site_user_lookup = page.Page( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
207 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
208 |
r'^user/lookup$', |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
209 |
'soc.views.site.user.profile.lookup'), |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
210 |
'Site: Look Up an Existing User', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
211 |
short_name='Look Up Site User', |
461
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
212 |
parent=user_sub_menu) |
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
213 |
|
461
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
214 |
user_create = page.Page( |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
215 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
216 |
r'^user/create$', |
461
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
217 |
'soc.views.models.user.create'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
218 |
'Site: Create New User Profile', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
219 |
short_name='Create Site User', |
461
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
220 |
parent=user_sub_menu) |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
221 |
|
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
222 |
site_user_edit = page.Page( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
223 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
224 |
r'^user/edit/%s$' % path_link_name.LINKNAME_ARG_PATTERN, |
461
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
225 |
'soc.views.models.user.edit'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
226 |
'Site: Modify Existing User Profile', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
227 |
short_name='Modify Site User', |
461
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
228 |
parent=user_sub_menu) |
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
229 |
|
461
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
230 |
user_show = page.Page( |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
231 |
page.Url( |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
232 |
r'^user/show/%s$' % path_link_name.LINKNAME_ARG_PATTERN, |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
233 |
'soc.views.models.user.public'), |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
234 |
'User: Show Existing User Profile', |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
235 |
parent=user_signout) |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
236 |
|
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
237 |
user_list = page.Page( |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
238 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
239 |
r'^user/list$', |
461
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
240 |
'soc.views.models.user.list'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
241 |
'Site: List of Users', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
242 |
short_name='List Site Users', |
461
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
243 |
parent=user_sub_menu) |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
244 |
|
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
245 |
user_delete = page.Page( |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
246 |
page.Url( |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
247 |
r'^user/delete/%s$' % path_link_name.LINKNAME_ARG_PATTERN, |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
248 |
'soc.views.models.user.delete'), |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
249 |
'Site: Delete Existing User', |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
250 |
short_name='Delete Site User', |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
251 |
parent=user_sub_menu) |
fca6a8b5ae34
Partially use the new user code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
452
diff
changeset
|
252 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
253 |
|
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
254 |
# Document views |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
255 |
document_show = page.Page( |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
256 |
page.Url( |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
257 |
r'^document/show/%s$' % path_link_name.PATH_LINKNAME_ARGS_PATTERN, |
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
258 |
'soc.views.models.document.public'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
259 |
'Show Document', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
260 |
parent=home) |
403
d3e545a8bd26
Some more improvements to the generic view code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
401
diff
changeset
|
261 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
262 |
# Site Document views |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
263 |
site_document_sub_menu = page.NonPage( |
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
264 |
'site-document-sub-menu', |
372
8595c1129c74
Formalize the concept of a NonPage that can appear in the site-map, useful for
Todd Larsen <tlarsen@google.com>
parents:
350
diff
changeset
|
265 |
'Site: Documents Sub-Menu', |
349
bb82a1a3339c
A quick-and-dirty way to create non-link sub-menu dividers, plus a TODO on
Todd Larsen <tlarsen@google.com>
parents:
347
diff
changeset
|
266 |
short_name='Site Documents', |
425
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
267 |
parent=site_sub_menu) |
349
bb82a1a3339c
A quick-and-dirty way to create non-link sub-menu dividers, plus a TODO on
Todd Larsen <tlarsen@google.com>
parents:
347
diff
changeset
|
268 |
|
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
269 |
site_document_create = page.Page( |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
270 |
page.Url( |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
271 |
r'^document/edit$', |
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
272 |
'soc.views.models.document.create'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
273 |
'Site: Create New Document', |
350
e8f14fde7f0e
"new" is a little bit redundant in the short_name of sidebar menu items that
Todd Larsen <tlarsen@google.com>
parents:
349
diff
changeset
|
274 |
'Create Site Document', |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
275 |
parent=site_document_sub_menu) |
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
276 |
|
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
277 |
site_document_edit = page.Page( |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
278 |
page.Url( |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
279 |
r'^document/edit/%s$' % path_link_name.PATH_LINKNAME_ARGS_PATTERN, |
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
280 |
'soc.views.models.document.edit'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
281 |
'Site: Modify Existing Document', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
282 |
short_name='Modify Site Document', |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
283 |
parent=site_document_sub_menu) |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
284 |
|
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
285 |
site_document_delete = page.Page( |
314
dfaf249c12b2
Rearrange imports in home.py so they apply to new discussed format (separate "from ..." and "import ..." blocks). Add Delete Document functionality.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
305
diff
changeset
|
286 |
page.Url( |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
287 |
r'^document/delete/%s$' % path_link_name.PATH_LINKNAME_ARGS_PATTERN, |
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
288 |
'soc.views.models.document.delete'), |
314
dfaf249c12b2
Rearrange imports in home.py so they apply to new discussed format (separate "from ..." and "import ..." blocks). Add Delete Document functionality.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
305
diff
changeset
|
289 |
'Site: Delete Existing Document', |
dfaf249c12b2
Rearrange imports in home.py so they apply to new discussed format (separate "from ..." and "import ..." blocks). Add Delete Document functionality.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
305
diff
changeset
|
290 |
short_name='Delete Site Document', |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
291 |
parent=site_document_sub_menu) |
314
dfaf249c12b2
Rearrange imports in home.py so they apply to new discussed format (separate "from ..." and "import ..." blocks). Add Delete Document functionality.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
305
diff
changeset
|
292 |
|
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
293 |
site_document_list = page.Page( |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
294 |
page.Url( |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
295 |
r'^document/list$', |
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
296 |
'soc.views.models.document.list'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
297 |
'Site: List of Documents', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
298 |
short_name='List Site Documents', |
477
8a8b1bd035c4
Moved from docs -> document
Sverre Rabbelier <srabbelier@gmail.com>
parents:
469
diff
changeset
|
299 |
parent=site_document_sub_menu) |
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
300 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
301 |
# Sponsor Group public view |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
302 |
sponsor_profile = page.Page( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
303 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
304 |
r'^sponsor/show/%s$' % path_link_name.LINKNAME_ARG_PATTERN, |
401
37d0b6c25f3e
Make use of the new generic views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
392
diff
changeset
|
305 |
'soc.views.models.sponsor.public'), |
372
8595c1129c74
Formalize the concept of a NonPage that can appear in the site-map, useful for
Todd Larsen <tlarsen@google.com>
parents:
350
diff
changeset
|
306 |
'Sponsor Public Profile', |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
307 |
parent=home) |
403
d3e545a8bd26
Some more improvements to the generic view code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
401
diff
changeset
|
308 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
309 |
# Sponsor Group Site views |
372
8595c1129c74
Formalize the concept of a NonPage that can appear in the site-map, useful for
Todd Larsen <tlarsen@google.com>
parents:
350
diff
changeset
|
310 |
site_sponsor_sub_menu = page.NonPage( |
8595c1129c74
Formalize the concept of a NonPage that can appear in the site-map, useful for
Todd Larsen <tlarsen@google.com>
parents:
350
diff
changeset
|
311 |
'site-sponsor-sub-menu', |
8595c1129c74
Formalize the concept of a NonPage that can appear in the site-map, useful for
Todd Larsen <tlarsen@google.com>
parents:
350
diff
changeset
|
312 |
'Site: Sponsors Sub-Menu', |
349
bb82a1a3339c
A quick-and-dirty way to create non-link sub-menu dividers, plus a TODO on
Todd Larsen <tlarsen@google.com>
parents:
347
diff
changeset
|
313 |
short_name='Site Sponsors', |
425
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
314 |
parent=site_sub_menu) |
349
bb82a1a3339c
A quick-and-dirty way to create non-link sub-menu dividers, plus a TODO on
Todd Larsen <tlarsen@google.com>
parents:
347
diff
changeset
|
315 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
316 |
site_sponsor_create = page.Page( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
317 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
318 |
r'^sponsor/create$', |
401
37d0b6c25f3e
Make use of the new generic views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
392
diff
changeset
|
319 |
'soc.views.models.sponsor.create'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
320 |
'Site: Create New Sponsor', |
350
e8f14fde7f0e
"new" is a little bit redundant in the short_name of sidebar menu items that
Todd Larsen <tlarsen@google.com>
parents:
349
diff
changeset
|
321 |
short_name='Create Site Sponsor', |
349
bb82a1a3339c
A quick-and-dirty way to create non-link sub-menu dividers, plus a TODO on
Todd Larsen <tlarsen@google.com>
parents:
347
diff
changeset
|
322 |
parent=site_sponsor_sub_menu) |
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
323 |
|
292
1cece5192e26
Enable recently commited delete Sponsor request handler (added to map.py) and Delete button in Sponsor edit view. Still missing "Are you sure ?" question box.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
282
diff
changeset
|
324 |
site_sponsor_delete = page.Page( |
1cece5192e26
Enable recently commited delete Sponsor request handler (added to map.py) and Delete button in Sponsor edit view. Still missing "Are you sure ?" question box.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
282
diff
changeset
|
325 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
326 |
r'^sponsor/delete/%s$' % path_link_name.LINKNAME_ARG_PATTERN, |
401
37d0b6c25f3e
Make use of the new generic views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
392
diff
changeset
|
327 |
'soc.views.models.sponsor.delete'), |
292
1cece5192e26
Enable recently commited delete Sponsor request handler (added to map.py) and Delete button in Sponsor edit view. Still missing "Are you sure ?" question box.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
282
diff
changeset
|
328 |
'Site: Delete Existing Sponsor', |
1cece5192e26
Enable recently commited delete Sponsor request handler (added to map.py) and Delete button in Sponsor edit view. Still missing "Are you sure ?" question box.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
282
diff
changeset
|
329 |
short_name='Delete Site Sponsor', |
349
bb82a1a3339c
A quick-and-dirty way to create non-link sub-menu dividers, plus a TODO on
Todd Larsen <tlarsen@google.com>
parents:
347
diff
changeset
|
330 |
parent=site_sponsor_sub_menu) |
292
1cece5192e26
Enable recently commited delete Sponsor request handler (added to map.py) and Delete button in Sponsor edit view. Still missing "Are you sure ?" question box.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
282
diff
changeset
|
331 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
332 |
site_sponsor_edit = page.Page( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
333 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
334 |
r'^sponsor/edit/%s$' % path_link_name.LINKNAME_ARG_PATTERN, |
401
37d0b6c25f3e
Make use of the new generic views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
392
diff
changeset
|
335 |
'soc.views.models.sponsor.edit'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
336 |
'Site: Modify Existing Sponsor', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
337 |
short_name='Modify Site Sponsor', |
349
bb82a1a3339c
A quick-and-dirty way to create non-link sub-menu dividers, plus a TODO on
Todd Larsen <tlarsen@google.com>
parents:
347
diff
changeset
|
338 |
parent=site_sponsor_sub_menu) |
292
1cece5192e26
Enable recently commited delete Sponsor request handler (added to map.py) and Delete button in Sponsor edit view. Still missing "Are you sure ?" question box.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
282
diff
changeset
|
339 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
340 |
site_sponsor_list = page.Page( |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
341 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
342 |
r'^sponsor/list$', |
401
37d0b6c25f3e
Make use of the new generic views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
392
diff
changeset
|
343 |
'soc.views.models.sponsor.list'), |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
344 |
'Site: List of Sponsors', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
345 |
short_name='List Site Sponsors', |
349
bb82a1a3339c
A quick-and-dirty way to create non-link sub-menu dividers, plus a TODO on
Todd Larsen <tlarsen@google.com>
parents:
347
diff
changeset
|
346 |
parent=site_sponsor_sub_menu) |
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
347 |
|
409
9d24850db88f
Addressed comments by Pawel and Todd
Sverre Rabbelier <srabbelier@gmail.com>
parents:
405
diff
changeset
|
348 |
# Host public view |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
349 |
host_profile = page.Page( |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
350 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
351 |
r'^host/show/(?P<sponsor_ln>%(lnp)s)/(?P<user_ln>%(lnp)s)$' % { |
409
9d24850db88f
Addressed comments by Pawel and Todd
Sverre Rabbelier <srabbelier@gmail.com>
parents:
405
diff
changeset
|
352 |
'lnp': path_link_name.LINKNAME_PATTERN_CORE}, |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
353 |
'soc.views.models.host.public'), |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
354 |
'Host Public Profile', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
355 |
parent=home) |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
356 |
|
409
9d24850db88f
Addressed comments by Pawel and Todd
Sverre Rabbelier <srabbelier@gmail.com>
parents:
405
diff
changeset
|
357 |
# Host Site views |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
358 |
site_host_sub_menu = page.NonPage( |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
359 |
'site-host-sub-menu', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
360 |
'Site: Host Sub-Menu', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
361 |
short_name='Site Hosts', |
425
95058c81a065
Change Site and User sub-menus so that the "header" entry for those sub-menus
Todd Larsen <tlarsen@google.com>
parents:
409
diff
changeset
|
362 |
parent=site_sub_menu) |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
363 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
364 |
site_host_create = page.Page( |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
365 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
366 |
r'^host/create$', |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
367 |
'soc.views.models.host.create'), |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
368 |
'Site: Create New Host', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
369 |
short_name='Create Site Host', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
370 |
parent=site_host_sub_menu) |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
371 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
372 |
site_host_delete = page.Page( |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
373 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
374 |
r'^host/delete/(?P<sponsor_ln>%(lnp)s)/(?P<user_ln>%(lnp)s)$' % { |
409
9d24850db88f
Addressed comments by Pawel and Todd
Sverre Rabbelier <srabbelier@gmail.com>
parents:
405
diff
changeset
|
375 |
'lnp': path_link_name.LINKNAME_PATTERN_CORE}, |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
376 |
'soc.views.models.host.delete'), |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
377 |
'Site: Delete Existing Host', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
378 |
short_name='Delete Site Host', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
379 |
parent=site_host_sub_menu) |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
380 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
381 |
site_host_edit = page.Page( |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
382 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
383 |
r'^host/edit/(?P<sponsor_ln>%(lnp)s)/(?P<user_ln>%(lnp)s)$' % { |
409
9d24850db88f
Addressed comments by Pawel and Todd
Sverre Rabbelier <srabbelier@gmail.com>
parents:
405
diff
changeset
|
384 |
'lnp': path_link_name.LINKNAME_PATTERN_CORE}, |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
385 |
'soc.views.models.host.edit'), |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
386 |
'Site: Modify Existing Host', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
387 |
short_name='Modify Site Host', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
388 |
parent=site_host_sub_menu) |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
389 |
|
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
390 |
site_host_list = page.Page( |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
391 |
page.Url( |
445
31927f21970d
Major site restructuring, also deleting of many unused or obsolete documents
Sverre Rabbelier <srabbelier@gmail.com>
parents:
430
diff
changeset
|
392 |
r'^host/list$', |
404
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
393 |
'soc.views.models.host.list'), |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
394 |
'Site: List of Hosts', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
395 |
short_name='List Site Hosts', |
44223e50e1fc
Added a Host profile and generalized some views
Sverre Rabbelier <srabbelier@gmail.com>
parents:
403
diff
changeset
|
396 |
parent=site_host_sub_menu) |
192
f6bf679dab26
Simple MenuItem and Menu classes for keeping track of ordered menus.
Todd Larsen <tlarsen@google.com>
parents:
diff
changeset
|
397 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
398 |
# these are not really used... |
298
c76a366c7ab4
Replace almost all occurences of linkname with link_name
Sverre Rabbelier <srabbelier@gmail.com>
parents:
292
diff
changeset
|
399 |
# (r'^org/profile/(?P<program>ghop[_0-9a-z]+)/(?P<link_name>[_0-9a-z]+)/$', |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
400 |
# 'soc.views.person.profile.edit', |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
401 |
# {'template': 'ghop/person/profile/edit.html'}), |
298
c76a366c7ab4
Replace almost all occurences of linkname with link_name
Sverre Rabbelier <srabbelier@gmail.com>
parents:
292
diff
changeset
|
402 |
# (r'^org/profile/(?P<program>[_0-9a-z]+)/(?P<link_name>[_0-9a-z]+)/$', |
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
403 |
# 'soc.views.person.profile.edit'), |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
404 |
|
403
d3e545a8bd26
Some more improvements to the generic view code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
401
diff
changeset
|
405 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
406 |
ROOT_PAGES = [ |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
407 |
# /, first level of the sidebar menu, excluded from breadcrumbs |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
408 |
home, |
403
d3e545a8bd26
Some more improvements to the generic view code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
401
diff
changeset
|
409 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
410 |
# alternate view of /, no menu presence |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
411 |
site_home, |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
412 |
] |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
413 |
|
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
414 |
|
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
415 |
def getDjangoUrlPatterns(pages=ROOT_PAGES): |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
416 |
"""Returns Django urlpatterns derived from the site map Pages. |
403
d3e545a8bd26
Some more improvements to the generic view code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
401
diff
changeset
|
417 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
418 |
Args: |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
419 |
pages: a list of page.Page objects from which to generate urlpatterns |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
420 |
(from them and from their child Pages); default is ROOT_PAGES |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
421 |
|
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
422 |
Raises: |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
423 |
KeyError if more than one Page has the same urlpattern. |
403
d3e545a8bd26
Some more improvements to the generic view code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
401
diff
changeset
|
424 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
425 |
TODO(tlarsen): this probably does not work correctly, currently, since |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
426 |
page.Page.makeDjangoUrls() returns a list, and this routine is |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
427 |
combining lists from potentially multiple page hierarchies. Each list |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
428 |
might have a urlpattern that the other contains, but this won't be |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
429 |
detected by the current code (will Django catch this?). This really |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
430 |
needs to be detected earlier via a global Page dictionary. |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
431 |
""" |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
432 |
urlpatterns = [''] |
403
d3e545a8bd26
Some more improvements to the generic view code
Sverre Rabbelier <srabbelier@gmail.com>
parents:
401
diff
changeset
|
433 |
|
282
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
434 |
for page in pages: |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
435 |
urlpatterns.extend(page.makeDjangoUrls()) |
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
436 |
|
600e0a9bfa06
A site layout ("site map") of the web application, including URL regular
Todd Larsen <tlarsen@google.com>
parents:
196
diff
changeset
|
437 |
return defaults.patterns(*urlpatterns) |