|
1 #!/usr/bin/python2.5 |
|
2 # |
|
3 # Copyright 2008 the Melange authors. |
|
4 # |
|
5 # Licensed under the Apache License, Version 2.0 (the "License"); |
|
6 # you may not use this file except in compliance with the License. |
|
7 # You may obtain a copy of the License at |
|
8 # |
|
9 # http://www.apache.org/licenses/LICENSE-2.0 |
|
10 # |
|
11 # Unless required by applicable law or agreed to in writing, software |
|
12 # distributed under the License is distributed on an "AS IS" BASIS, |
|
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 # See the License for the specific language governing permissions and |
|
15 # limitations under the License. |
|
16 |
|
17 """Module that constructs the sitemap |
|
18 """ |
|
19 |
|
20 __authors__ = [ |
|
21 '"Sverre Rabbelier" <sverre@rabbelier.nl>', |
|
22 ] |
|
23 |
|
24 |
|
25 from django.conf.urls import defaults |
|
26 |
|
27 from soc.views.models import document |
|
28 from soc.views.models import home_settings |
|
29 from soc.views.models import host |
|
30 from soc.views.models import request |
|
31 from soc.views.models import user |
|
32 from soc.views.models import site_settings |
|
33 from soc.views.models import sponsor |
|
34 |
|
35 from soc.views.sitemap import sidebar |
|
36 from soc.views.sitemap import sitemap |
|
37 |
|
38 |
|
39 sidebar.SIDEBAR.append(user.view.getUserSidebar()) |
|
40 |
|
41 sidebar.SIDEBAR.append(home_settings.view.getSidebarLinks()) |
|
42 sitemap.addPages(home_settings.view.getDjangoURLPatterns()) |
|
43 |
|
44 sidebar.SIDEBAR.append(site_settings.view.getSidebarLinks()) |
|
45 sitemap.addPages(site_settings.view.getDjangoURLPatterns()) |
|
46 |
|
47 sidebar.SIDEBAR.append(user.view.getSidebarLinks()) |
|
48 sitemap.addPages(user.view.getDjangoURLPatterns()) |
|
49 |
|
50 sidebar.SIDEBAR.append(document.view.getSidebarLinks()) |
|
51 sitemap.addPages(document.view.getDjangoURLPatterns()) |
|
52 |
|
53 sidebar.SIDEBAR.append(sponsor.view.getSidebarLinks()) |
|
54 sitemap.addPages(sponsor.view.getDjangoURLPatterns()) |
|
55 |
|
56 sidebar.SIDEBAR.append(host.view.getSidebarLinks()) |
|
57 sitemap.addPages(host.view.getDjangoURLPatterns()) |
|
58 |
|
59 sidebar.SIDEBAR.append(request.view.getSidebarLinks()) |
|
60 sitemap.addPages(request.view.getDjangoURLPatterns()) |
|
61 |
|
62 |
|
63 def getPatterns(): |
|
64 return defaults.patterns(None, *sitemap.SITEMAP) |