예제 #1
0
파일: urls.py 프로젝트: NMRWIKI/psdb-code
from coffin.conf.urls.defaults import patterns, include, url
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    url(r'^$', 'psdb.views.home', name='home'),
    url(r'^organizations/', include('organizations.urls')),
    url(r'^pulse_sequences/', include('pulse_sequences.urls')),
    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)
예제 #2
0
# -*- coding: utf-8 -*-
'''URLs for the test API.'''

from coffin.conf.urls.defaults import include, patterns
from piston.authentication.oauth import OAuthAuthentication
from piston.resource import Resource
from .handlers import HelloHandler

auth_three = OAuthAuthentication(realm='Test API')
auth_two = OAuthAuthentication(realm='Test API', two_legged=True)
three_handler = Resource(handler=HelloHandler, authentication=auth_three)
two_handler = Resource(handler=HelloHandler, authentication=auth_two)

urlpatterns = patterns(
    '',
    (r'^three/$', three_handler, {
        'emitter_format': 'json'
    }),
    (r'^two/$', two_handler, {
        'emitter_format': 'json'
    }),
    (r'', include('baph.piston.oauth.urls')),
)
예제 #3
0
파일: urls.py 프로젝트: alvaromartin/baph
# -*- coding: utf-8 -*-
'''URLs for the test API.'''

from coffin.conf.urls.defaults import include, patterns
from piston.authentication.oauth import OAuthAuthentication
from piston.resource import Resource
from .handlers import HelloHandler

auth_three = OAuthAuthentication(realm='Test API')
auth_two = OAuthAuthentication(realm='Test API', two_legged=True)
three_handler = Resource(handler=HelloHandler, authentication=auth_three)
two_handler = Resource(handler=HelloHandler, authentication=auth_two)

urlpatterns = patterns('',
    (r'^three/$', three_handler, {'emitter_format': 'json'}),
    (r'^two/$', two_handler, {'emitter_format': 'json'}),
    (r'', include('baph.piston.oauth.urls')),
)
예제 #4
0
urlpatterns = patterns('',
    url(r'^activate/complete/$',
        direct_to_template,
        {'template': 'registration/activation_complete.html'},
        name='registration_activation_complete'),
    # Activation keys get matched by \w+ instead of the more specific
    # [a-fA-F0-9]{40} because a bad activation key should still get to the
    # view; that way it can return a sensible "invalid key" message instead of
    # a confusing 404.
    url(r'^activate/(?P<activation_key>\w+)/$',
        activate,
        {'backend': BACKEND},
        name='registration_activate'),
    url(r'^register/$',
        register,
        {
            'backend': BACKEND,
            'SSL': True,
        },
        name='registration_register'),
    url(r'^register/complete/$',
        direct_to_template,
        {'template': 'registration/registration_complete.html'},
        name='registration_complete'),
    url(r'^register/closed/$',
        direct_to_template,
        {'template': 'registration/registration_closed.html'},
        name='registration_disallowed'),
    (r'', include('baph.auth.urls')),
)