source: trunk/sara_cmt/sara_cmt/urls.py @ 14194

Last change on this file since 14194 was 14194, checked in by sil, 12 years ago

Merged branch 1.0 (until tag 1.0.0) back to trunk

File size: 2.8 KB
Line 
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
18from django.conf.urls.defaults import *
19from django.contrib import databrowse
20
21# Uncomment the next two lines to enable the admin:
22from django.contrib import admin
23import sara_cmt.api.urls
24admin.autodiscover()
25
26urlpatterns = 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
46from sara_cmt.cluster.models import Cluster, HardwareUnit, Interface, \
47                                    Network, Rack
48databrowse.site.register(Cluster)
49databrowse.site.register(HardwareUnit)
50databrowse.site.register(Interface)
51databrowse.site.register(Network)
52databrowse.site.register(Rack)
53# locations
54from sara_cmt.cluster.models import Country, Address, Room
55databrowse.site.register(Country)
56databrowse.site.register(Address)
57databrowse.site.register(Room)
58# contacts
59from sara_cmt.cluster.models import Company, Telephonenumber, Connection
60databrowse.site.register(Company)
61databrowse.site.register(Telephonenumber)
62databrowse.site.register(Connection)
63# specifications
64from sara_cmt.cluster.models import HardwareModel, Role, InterfaceType
65databrowse.site.register(HardwareModel)
66databrowse.site.register(Role)
67databrowse.site.register(InterfaceType)
68# support
69from sara_cmt.cluster.models import WarrantyContract, WarrantyType
70databrowse.site.register(WarrantyContract)
71databrowse.site.register(WarrantyType)
72
73# tags
74from tagging.models import *
75databrowse.site.register(Tag)
76databrowse.site.register(TaggedItem)
Note: See TracBrowser for help on using the repository browser.