Пример #1
0
"""
One url meant to be used by JavaScript.

session_security_ping
    Connects the PingView.

To install this url, include it in ``urlpatterns`` definition in ``urls.py``,
ie::

    urlpatterns = patterns('',
        # ....
        url(r'session_security/', include('session_security.urls')),
        # ....
    )

"""

from django.conf.urls.defaults import url, patterns

from views import PingView

urlpatterns = patterns('',
    url(
        'ping/$',
        PingView.as_view(),
        name='session_security_ping',
    ),
)
Пример #2
0
from django.conf.urls import patterns
from views import (IndexView, DfView, HostnameView, ExternalipView, IssueView,
                   MemoryView, WhoView, NumcpuView, PsView, UsersView,
                   WhereisView, BootView, LoadavgView, BandwidthView,
                   DnsmasqView, PingView, TimeView)

urlpatterns = patterns(
    '',
    (r'^$', IndexView.as_view()),
    (r'^sh/df/$', DfView.as_view()),
    (r'^sh/hostname/$', HostnameView.as_view()),
    (r'^sh/ip/$', ExternalipView.as_view()),
    (r'^sh/issue/$', IssueView.as_view()),
    (r'^sh/mem/$', MemoryView.as_view()),
    (r'^sh/online/$', WhoView.as_view()),
    (r'^sh/numberofcores/$', NumcpuView.as_view()),
    (r'^sh/loadavg/$', LoadavgView.as_view()),
    (r'^sh/ps/$', PsView.as_view()),
    (r'^sh/users/$', UsersView.as_view()),
    (r'^sh/whereis/$', WhereisView.as_view()),
    (r'^sh/boot/$', BootView.as_view()),
    (r'^sh/bandwidth/$', BandwidthView.as_view()),
    (r'^sh/dnsmasq-leases/$', DnsmasqView.as_view()),
    (r'^sh/ping/$', PingView.as_view()),
    (r'^sh/time/$', TimeView.as_view()),
)