Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / userdata / urls.py @ cddc2b2f

History | View | Annotate | Download (2.2 kB)

1 49f50673 Vangelis Koukis
#
2 49f50673 Vangelis Koukis
# Copyright 2011 GRNET S.A. All rights reserved.
3 49f50673 Vangelis Koukis
#
4 49f50673 Vangelis Koukis
# Redistribution and use in source and binary forms, with or
5 49f50673 Vangelis Koukis
# without modification, are permitted provided that the following
6 49f50673 Vangelis Koukis
# conditions are met:
7 49f50673 Vangelis Koukis
#
8 49f50673 Vangelis Koukis
#   1. Redistributions of source code must retain the above
9 49f50673 Vangelis Koukis
#      copyright notice, this list of conditions and the following
10 49f50673 Vangelis Koukis
#      disclaimer.
11 49f50673 Vangelis Koukis
#
12 49f50673 Vangelis Koukis
#   2. Redistributions in binary form must reproduce the above
13 49f50673 Vangelis Koukis
#      copyright notice, this list of conditions and the following
14 49f50673 Vangelis Koukis
#      disclaimer in the documentation and/or other materials
15 49f50673 Vangelis Koukis
#      provided with the distribution.
16 49f50673 Vangelis Koukis
#
17 49f50673 Vangelis Koukis
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
18 49f50673 Vangelis Koukis
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 49f50673 Vangelis Koukis
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 49f50673 Vangelis Koukis
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
21 49f50673 Vangelis Koukis
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 49f50673 Vangelis Koukis
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 49f50673 Vangelis Koukis
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24 49f50673 Vangelis Koukis
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25 49f50673 Vangelis Koukis
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 49f50673 Vangelis Koukis
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
27 49f50673 Vangelis Koukis
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 49f50673 Vangelis Koukis
# POSSIBILITY OF SUCH DAMAGE.
29 49f50673 Vangelis Koukis
#
30 49f50673 Vangelis Koukis
# The views and conclusions contained in the software and
31 49f50673 Vangelis Koukis
# documentation are those of the authors and should not be
32 49f50673 Vangelis Koukis
# interpreted as representing official policies, either expressed
33 49f50673 Vangelis Koukis
# or implied, of GRNET S.A.
34 49f50673 Vangelis Koukis
35 6b256427 Christos Stavrakakis
from django.conf.urls import patterns, url
36 a6b17d33 Christos Stavrakakis
37 b47b110d Kostas Papadimitriou
from synnefo.userdata import views
38 7f16b9b1 Kostas Papadimitriou
from django.http import Http404
39 7f16b9b1 Kostas Papadimitriou
40 7f16b9b1 Kostas Papadimitriou
41 7f16b9b1 Kostas Papadimitriou
def index(request):
42 7f16b9b1 Kostas Papadimitriou
    raise Http404
43 eee0487e Kostas Papadimitriou
44 4691814d Ilias Tsitsimpis
urlpatterns = patterns(
45 4691814d Ilias Tsitsimpis
    '',
46 7f16b9b1 Kostas Papadimitriou
    url(r'^$', index, name='ui_userdata'),
47 7f16b9b1 Kostas Papadimitriou
    url(r'^keys$',
48 7f16b9b1 Kostas Papadimitriou
        views.PublicKeyPairCollectionView.as_view('ui_keys_resource'),
49 d194e869 Kostas Papadimitriou
        name='ui_keys_collection'),
50 4264d385 Kostas Papadimitriou
    url(r'^keys/(?P<id>\d+)',
51 4691814d Ilias Tsitsimpis
        views.PublicKeyPairResourceView.as_view('ui_keys_resource'),
52 d194e869 Kostas Papadimitriou
        name="ui_keys_resource"),
53 7f16b9b1 Kostas Papadimitriou
    url(r'keys/generate', views.generate_key_pair,
54 7f16b9b1 Kostas Papadimitriou
        name="ui_generate_public_key"),
55 7f16b9b1 Kostas Papadimitriou
    url(r'keys/download', views.download_private_key,
56 7f16b9b1 Kostas Papadimitriou
        name="ui_download_public_key")
57 eee0487e Kostas Papadimitriou
)