12 # See the License for the specific language governing permissions and |
12 # See the License for the specific language governing permissions and |
13 # limitations under the License. |
13 # limitations under the License. |
14 |
14 |
15 __authors__ = [ |
15 __authors__ = [ |
16 '"Augie Fackler" <durin42@gmail.com>', |
16 '"Augie Fackler" <durin42@gmail.com>', |
|
17 '"Todd Larsen" <tlarsen@google.com>', |
17 '"Pawel Solyga" <pawel.solyga@gmail.com>', |
18 '"Pawel Solyga" <pawel.solyga@gmail.com>', |
18 ] |
19 ] |
19 |
20 |
20 |
21 |
21 from django.conf.urls.defaults import * |
22 from soc.logic.site import map |
22 |
|
23 from soc.logic import path_linkname |
|
24 |
23 |
25 |
24 |
26 urlpatterns = patterns( |
25 urlpatterns = map.getDjangoUrlPatterns() |
27 # Home Page view |
|
28 '', |
|
29 (r'^$', 'soc.views.site.home.public'), |
|
30 |
|
31 # Home Page Site views |
|
32 (r'^site/home$', 'soc.views.site.home.public'), |
|
33 (r'^site/home/edit$', 'soc.views.site.home.edit'), |
|
34 |
|
35 # TODO(tlarsen): uncomment these when the view functions are committed |
|
36 # attempt to send User to their dashboard |
|
37 # (will display soc.views.user.roles.public() if "linkname" is not |
|
38 # current logged-in User) |
|
39 # (r'^user/roles$', |
|
40 # 'soc.views.user.roles.dashboard'), |
|
41 # (r'^user/roles/(?P<linkname>[_0-9a-z]+)$', |
|
42 # 'soc.views.user.roles.dashboard'), |
|
43 |
|
44 # User Profile Site views |
|
45 (r'^site/user/lookup$', 'soc.views.site.user.profile.lookup'), |
|
46 (r'^site/user/profile$', 'soc.views.site.user.profile.create'), |
|
47 (r'^site/user/profile/%s$' % path_linkname.LINKNAME_ARG_PATTERN, |
|
48 'soc.views.site.user.profile.edit'), |
|
49 (r'^site/user/list$', 'soc.views.site.user.list.all'), |
|
50 |
|
51 # Document views |
|
52 (r'^docs/show/%s$' % path_linkname.PATH_LINKNAME_ARGS_PATTERN, |
|
53 'soc.views.docs.show.public'), |
|
54 |
|
55 # Document Site views |
|
56 (r'^site/docs/edit$', 'soc.views.site.docs.edit.create'), |
|
57 (r'^site/docs/edit/%s$' % path_linkname.PATH_LINKNAME_ARGS_PATTERN, |
|
58 'soc.views.site.docs.edit.edit'), |
|
59 (r'^site/docs/list$', 'soc.views.site.docs.list.all'), |
|
60 |
|
61 # Sponsor Group public view |
|
62 (r'^sponsor/profile/%s' % path_linkname.LINKNAME_ARG_PATTERN, |
|
63 'soc.views.sponsor.profile.public'), |
|
64 |
|
65 # Sponsor Group Site views |
|
66 (r'^site/sponsor/profile$', 'soc.views.site.sponsor.profile.edit'), |
|
67 (r'^site/sponsor/profile/%s' % path_linkname.LINKNAME_ARG_PATTERN, |
|
68 'soc.views.site.sponsor.profile.edit'), |
|
69 (r'^site/sponsor/list$', 'soc.views.site.sponsor.list.all'), |
|
70 |
|
71 # User Profile views |
|
72 (r'^user/profile$', 'soc.views.user.profile.edit'), |
|
73 (r'^user/profile/%s$' % path_linkname.LINKNAME_ARG_PATTERN, |
|
74 'soc.views.user.profile.edit'), |
|
75 |
|
76 # these are not really used... |
|
77 (r'^org/profile/(?P<program>ghop[_0-9a-z]+)/(?P<linkname>[_0-9a-z]+)/$', |
|
78 'soc.views.person.profile.edit', |
|
79 {'template': 'ghop/person/profile/edit.html'}), |
|
80 (r'^org/profile/(?P<program>[_0-9a-z]+)/(?P<linkname>[_0-9a-z]+)/$', |
|
81 'soc.views.person.profile.edit'), |
|
82 ) |
|