Statistics
| Branch: | Tag: | Revision:

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

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 eee0487e Kostas Papadimitriou
from django.conf.urls.defaults import *
36 b47b110d Kostas Papadimitriou
from synnefo.userdata import views
37 7f16b9b1 Kostas Papadimitriou
from django.http import Http404
38 7f16b9b1 Kostas Papadimitriou
39 7f16b9b1 Kostas Papadimitriou
40 7f16b9b1 Kostas Papadimitriou
def index(request):
41 7f16b9b1 Kostas Papadimitriou
    raise Http404
42 eee0487e Kostas Papadimitriou
43 4691814d Ilias Tsitsimpis
urlpatterns = patterns(
44 4691814d Ilias Tsitsimpis
    '',
45 7f16b9b1 Kostas Papadimitriou
    url(r'^$', index, name='ui_userdata'),
46 7f16b9b1 Kostas Papadimitriou
    url(r'^keys$',
47 7f16b9b1 Kostas Papadimitriou
        views.PublicKeyPairCollectionView.as_view('ui_keys_resource'),
48 d194e869 Kostas Papadimitriou
        name='ui_keys_collection'),
49 4264d385 Kostas Papadimitriou
    url(r'^keys/(?P<id>\d+)',
50 4691814d Ilias Tsitsimpis
        views.PublicKeyPairResourceView.as_view('ui_keys_resource'),
51 d194e869 Kostas Papadimitriou
        name="ui_keys_resource"),
52 7f16b9b1 Kostas Papadimitriou
    url(r'keys/generate', views.generate_key_pair,
53 7f16b9b1 Kostas Papadimitriou
        name="ui_generate_public_key"),
54 7f16b9b1 Kostas Papadimitriou
    url(r'keys/download', views.download_private_key,
55 7f16b9b1 Kostas Papadimitriou
        name="ui_download_public_key")
56 eee0487e Kostas Papadimitriou
)