Esempio n. 1
0
from django.conf.urls import patterns, url
from views import CollectionView, ItemView, SkinView
from views import OpenAccessView, AllowedUsersView

urlpatterns = patterns(
    'wwwhisper_admin.views',
    url(r'^users/$',
        CollectionView.as_view(collection_name='users')),
    url(r'^users/(?P<uuid>[0-9a-z-]+)/$',
        ItemView.as_view(collection_name='users'),
        name='wwwhisper_user'),
    url(r'^locations/$',
        CollectionView.as_view(collection_name='locations')),
    url(r'^locations/(?P<uuid>[0-9a-z-]+)/$',
        ItemView.as_view(collection_name='locations'),
        name='wwwhisper_location'),
    url(r'^locations/(?P<location_uuid>[0-9a-z-]+)/allowed-users/' +
        '(?P<user_uuid>[0-9a-z-]+)/$',
        AllowedUsersView.as_view(),
        name='wwwhisper_allowed_user'),
    url(r'^locations/(?P<location_uuid>[0-9a-z-]+)/open-access/$',
        OpenAccessView.as_view()),
    url(r'^aliases/$',
        CollectionView.as_view(collection_name='aliases')),
    url(r'^aliases/(?P<uuid>[0-9a-z-]+)/$',
        ItemView.as_view(collection_name='aliases'),
        name='wwwhisper_alias'),
    url(r'^skin/$', SkinView.as_view()),
    )
Esempio n. 2
0
# wwwhisper - web access control.
# Copyright (C) 2012-2015 Jan Wrobel <*****@*****.**>
"""Urls exposed by the wwwhisper_admin application."""

from django.conf.urls import patterns, url
from views import CollectionView, ItemView, SkinView
from views import OpenAccessView, AllowedUsersView

urlpatterns = patterns(
    'wwwhisper_admin.views',
    url(r'^users/$', CollectionView.as_view(collection_name='users')),
    url(r'^users/(?P<uuid>[0-9a-z-]+)/$',
        ItemView.as_view(collection_name='users'),
        name='wwwhisper_user'),
    url(r'^locations/$', CollectionView.as_view(collection_name='locations')),
    url(r'^locations/(?P<uuid>[0-9a-z-]+)/$',
        ItemView.as_view(collection_name='locations'),
        name='wwwhisper_location'),
    url(r'^locations/(?P<location_uuid>[0-9a-z-]+)/allowed-users/' +
        '(?P<user_uuid>[0-9a-z-]+)/$',
        AllowedUsersView.as_view(),
        name='wwwhisper_allowed_user'),
    url(r'^locations/(?P<location_uuid>[0-9a-z-]+)/open-access/$',
        OpenAccessView.as_view()),
    url(r'^aliases/$', CollectionView.as_view(collection_name='aliases')),
    url(r'^aliases/(?P<uuid>[0-9a-z-]+)/$',
        ItemView.as_view(collection_name='aliases'),
        name='wwwhisper_alias'),
    url(r'^skin/$', SkinView.as_view()),
)
Esempio n. 3
0
"""Urls exposed by the wwwhisper_admin application."""

from django.conf.urls.defaults import patterns, url
from views import CollectionView, ItemView
from views import OpenAccessView, AllowedUsersView
from wwwhisper_auth import models

users_collection = models.UsersCollection()
locations_collection = models.LocationsCollection()

urlpatterns = patterns(
    "wwwhisper_admin.views",
    url(r"^users/$", CollectionView.as_view(collection=users_collection)),
    url(r"^users/(?P<uuid>[0-9a-z-]+)/$", ItemView.as_view(collection=users_collection)),
    url(r"^locations/$", CollectionView.as_view(collection=locations_collection)),
    url(
        r"^locations/(?P<uuid>[0-9a-z-]+)/$",
        ItemView.as_view(collection=locations_collection),
        name="wwwhisper_location",
    ),
    url(
        r"^locations/(?P<location_uuid>[0-9a-z-]+)/allowed-users/" + "(?P<user_uuid>[0-9a-z-]+)/$",
        AllowedUsersView.as_view(locations_collection=locations_collection),
        name="wwwhisper_allowed_user",
    ),
    url(
        r"^locations/(?P<location_uuid>[0-9a-z-]+)/open-access/$",
        OpenAccessView.as_view(locations_collection=locations_collection),
    ),
)