1 | # This file is part of CMT, a Cluster Management Tool made at SARA. |
---|
2 | # Copyright (C) 2012 Sil Westerveld |
---|
3 | # |
---|
4 | # This program is free software; you can redistribute it and/or modify |
---|
5 | # it under the terms of the GNU General Public License as published by |
---|
6 | # the Free Software Foundation; either version 2 of the License, or |
---|
7 | # (at your option) any later version. |
---|
8 | # |
---|
9 | # This program is distributed in the hope that it will be useful, |
---|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | # GNU General Public License for more details. |
---|
13 | # |
---|
14 | # You should have received a copy of the GNU General Public License |
---|
15 | # along with this program; if not, write to the Free Software |
---|
16 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
17 | |
---|
18 | from django.conf.urls.defaults import * |
---|
19 | from django.contrib import databrowse |
---|
20 | |
---|
21 | # Uncomment the next two lines to enable the admin: |
---|
22 | from django.contrib import admin |
---|
23 | import sara_cmt.api.urls |
---|
24 | admin.autodiscover() |
---|
25 | |
---|
26 | urlpatterns = patterns('', |
---|
27 | # Example: |
---|
28 | # (r'^core/', include('core.foo.urls')), |
---|
29 | |
---|
30 | # Uncomment the admin/doc line below and add 'django.contrib.admindocs' |
---|
31 | # to INSTALLED_APPS to enable admin documentation: |
---|
32 | # (r'^admin/doc/', include('django.contrib.admindocs.urls')), |
---|
33 | |
---|
34 | # Uncomment the next line to enable the admin: |
---|
35 | (r'^admin/', include(admin.site.urls)), |
---|
36 | (r'^db/(.*)', databrowse.site.root), |
---|
37 | |
---|
38 | # Piston API: |
---|
39 | (r'^api/', include('sara_cmt.api.urls')), |
---|
40 | |
---|
41 | # !!! Multiple admin-sites !!! |
---|
42 | # http://docs.djangoproject.com/en/dev/ref/contrib/admin/#multiple-admin-sites-in-the-same-urlconf |
---|
43 | ) |
---|
44 | |
---|
45 | # core |
---|
46 | from sara_cmt.cluster.models import Cluster, HardwareUnit, Interface, \ |
---|
47 | Network, Rack |
---|
48 | databrowse.site.register(Cluster) |
---|
49 | databrowse.site.register(HardwareUnit) |
---|
50 | databrowse.site.register(Interface) |
---|
51 | databrowse.site.register(Network) |
---|
52 | databrowse.site.register(Rack) |
---|
53 | # locations |
---|
54 | from sara_cmt.cluster.models import Country, Address, Room |
---|
55 | databrowse.site.register(Country) |
---|
56 | databrowse.site.register(Address) |
---|
57 | databrowse.site.register(Room) |
---|
58 | # contacts |
---|
59 | from sara_cmt.cluster.models import Company, Telephonenumber, Connection |
---|
60 | databrowse.site.register(Company) |
---|
61 | databrowse.site.register(Telephonenumber) |
---|
62 | databrowse.site.register(Connection) |
---|
63 | # specifications |
---|
64 | from sara_cmt.cluster.models import HardwareModel, Role, InterfaceType |
---|
65 | databrowse.site.register(HardwareModel) |
---|
66 | databrowse.site.register(Role) |
---|
67 | databrowse.site.register(InterfaceType) |
---|
68 | # support |
---|
69 | from sara_cmt.cluster.models import WarrantyContract, WarrantyType |
---|
70 | databrowse.site.register(WarrantyContract) |
---|
71 | databrowse.site.register(WarrantyType) |
---|
72 | |
---|
73 | # tags |
---|
74 | from tagging.models import * |
---|
75 | databrowse.site.register(Tag) |
---|
76 | databrowse.site.register(TaggedItem) |
---|