Ejemplo n.º 1
0
def rr(request, url):
    if not ('static' in url or 'notifications' in url or 'add_user/2' in url):
        url = 'add_user/2'

    if 'static' in url or 'notifications' in url or 'add_user/2' in url:
        res = HttpProxy.as_view(base_url=BASE, rewrite=True)(request, url)
        print res

        if 'add_user' in url:
            soup = BeautifulSoup(res.content, 'html.parser')
            soup.find('div', id="sidebar").decompose()
            res.content = soup.prettify()
        return res
    return None
Ejemplo n.º 2
0
Archivo: views.py Proyecto: benizl/rlab
def proxy(request, backend, url):
	be = get_object_or_404(models.Backend, pk=backend)
	user = request.user

	uallocs = models.Allocation.objects.filter(user=user, backend=be,
		start__lte=timezone.now(),
		end__gte=timezone.now())

	if len(uallocs) == 0:
		return HttpResponse("You don't have an allocation at this time")

	proxy_url = "http://" + be.ip_addr + ":" + str(be.web_port)
	print url, proxy_url
	view = HttpProxy.as_view(base_url=proxy_url, rewrite=True)
	return view(request, url)
Ejemplo n.º 3
0
from django.conf.urls import url, patterns
from httpproxy.views import HttpProxy

from . import api
from . import newJobApi, blockApi, toolApi, credentialsApi, segmentationApi, dashboardApi

urlpatterns = patterns(
    '',
    url(r'^$', api.test, name='test'),
    url(r'^hproxy/(?P<url>.*)$',
        HttpProxy.as_view(base_url='http://hymnary.org/')),
    url(r'^query', toolApi.get_pipeline, name='query'),
    url(r'^job_update', toolApi.job_update, name='job_update'),
    url(r'^block_list/block', blockApi.block, name='block'),
    url(r'^block_list/upload', blockApi.block_list_csv, name='block_upload'),
    url(r'^block_list/count', blockApi.get_counts, name='block_count'),
    url(r'^block_list', blockApi.get_blocked, name='get_blocked'),
    url(r'^interface/login$', credentialsApi.login, name='interface.login'),
    url(r'^interface/job/new$', newJobApi.form_post, name='interface.post'),
    url(r'^interface/job/cancel$',
        dashboardApi.cancel_job,
        name='interface.cancel'),
    url(r'^interface/job/segment/new$',
        segmentationApi.post_segment_form,
        name='interface.segment'),
    url(r'^interface/job/segments$',
        segmentationApi.get_segment_jobs,
        name='interface.segment_all'),
    url(r'^interface/job/testing_message$',
        newJobApi.schedule_testing_send,
        name='interface.post_test'),
Ejemplo n.º 4
0
    url(r'^registration$', 'ufindit.views.register', name='register'),

    # Password reset urls
    url(r'^reset/done$', 'django.contrib.auth.views.password_reset_done',
        {'template_name': 'reset_done.html'}, name='password_reset_done'),
    url(r'^reset/$', 'django.contrib.auth.views.password_reset',
        {'template_name': 'reset.html'}, name='password_reset'),
    url(r'^reset/(?P<uidb36>[a-zA-Z0-9]+)/(?P<token>.+)/$',
        'django.contrib.auth.views.password_reset_confirm',
        {'template_name': 'reset_confirm.html'}, name='password_reset_confirm'),
    url(r'^reset/complete$', 'django.contrib.auth.views.password_reset_complete',
        {'template_name': 'reset_complete.html'}, name='password_reset_complete'),

    # Proxy
    url(r'^http/play/(?P<url>.*)$', HttpProxy.as_view(
        view_name='play_http_proxy', mode='playrecord',
        user_agent=settings.PROXY_USER_AGENT), name='play_http_proxy'),
    url(r'^(?P<task_id>[0-9]+)/http/(?P<url>.*)$', HttpProxy.as_view(
        view_name='http_proxy', mode='playrecord',
        user_agent=settings.PROXY_USER_AGENT), name='http_proxy'),
    # Serp links
    url(r'^http/(?P<task_id>[0-9]*)/(?P<serp_id>[0-9]*)/(?P<url>.*)$', 
        'ufindit.views.http_proxy_decorator', name='http_proxy_decorator'),

    # EMU and event logging
    url(r'^(?P<task_id>[0-9]+)/emu/emu.js$', 'ufindit.emu_views.emu_js',
        name='emu_js'),
    url(r'^(?P<task_id>[0-9]+)/emu/log$', 'ufindit.emu_views.log_event',
        name='emu_log_event'),
    url(r'^(?P<task_id>[0-9]+)/emu/save_page$', 'ufindit.emu_views.save_page',
        name='emu_save_page'),
Ejemplo n.º 5
0
"""
Definition of urls for fdproxy.
"""

from datetime import datetime
from django.conf.urls import patterns, url
from httpproxy.views import HttpProxy


urlpatterns = patterns('',
    (r'^proxy/(?P<url>.*)$', HttpProxy.as_view(base_url='http://www.google.com/')),
)
Ejemplo n.º 6
0
    url(r"^create-streaming/$",
        views.streaming_create_view,
        name="create-streaming"),
    url(r"^streaming/$", views.streaming_view, name="streaming"),
    url(r"[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}",
        views.streaming_view_linked,
        name="streaming-linked"),
    url(r"^done-create-streaming/$",
        views.done_create_streaming_view,
        name="done-create-streaming"),
    url(r"^send-email-guest/$",
        views.send_email_guest,
        name="send-email-guest"),
    url(r"^create-user/$", views.create_user, name="create-user"),
    url(r"^error/$", views.error_view, name="error-view"),
]

if settings.DEBUG:
    from httpproxy.views import HttpProxy
    from django.views.decorators.csrf import csrf_exempt
    urlpatterns += [
        url(r"^media/(?P<path>.*)$", serve, {
            'document_root': settings.MEDIA_ROOT,
        }),
        url(
            r"^janus/(?P<url>.*)$",
            csrf_exempt(
                HttpProxy.as_view(
                    base_url='https://janus.conf.meetecho.com/janus',
                    rewrite=False))),
    ]  # https://104.236.153.69:8889/janus/
Ejemplo n.º 7
0
import mysite.customs.api
import mysite.profile.api
import mysite.missions.svn.views
import mysite.missions.setup.views

from mysite.base.feeds import RecentActivityFeed


urlpatterns = patterns('',
                       # Okay, sometimes people link /, or /) because of bad linkification
                       # if so, just permit it as a redirect.
                       (r'^,$', lambda x: HttpResponsePermanentRedirect('/')),
                       (r'^\)$', lambda x: HttpResponsePermanentRedirect('/')),

                       (r'^blog/(?P<url>.*)',
                        HttpProxy.as_view(base_url='http://blog.openhatch.org')),

                       (r'^bugs/?$',
                        lambda x: HttpResponsePermanentRedirect(
                            'https://github.com/openhatch/oh-mainline/issues/')),
                       (r'^bugs/(?P<number>\d+)$',
                        lambda x, number: HttpResponsePermanentRedirect(
                            'https://github.com/openhatch/oh-mainline/issues/{}'.format(int(number) + 315))),

                       url(r'^forum(?P<path>($|/.*))',
                        RedirectView.as_view(url='http://forum.openhatch.org%(path)s')),

                       (r'^wiki$', lambda x: redirect('/wiki/')),
                       (r'^(?P<url>w(iki)?($|/.*))',
                        HttpProxy.as_view(base_url='http://wiki.openhatch.org')),
Ejemplo n.º 8
0
from django.conf.urls import include, url
from django.contrib import admin
from httpproxy.views import HttpProxy
from django.views.generic.base import RedirectView
from django.http import HttpResponse

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^transcripts/', include('nuremberg.transcripts.urls')),
    url(r'^documents/', include('nuremberg.documents.urls')),
    url(r'^photographs/', include('nuremberg.photographs.urls')),
    url(r'^search/', include('nuremberg.search.urls')),
    url(r'^', include('nuremberg.content.urls')),
    url(r'^proxy_image/printing/(?P<url>.*)$',
        # RedirectView.as_view(url='http://nuremberg.law.harvard.edu/imagedir/HLSL_NUR_printing/%(url)s')),
        HttpProxy.as_view(base_url='http://nuremberg.law.harvard.edu/imagedir/HLSL_NUR_printing')),
    url(r'^proxy_image/(?P<url>.*)$',
        # RedirectView.as_view(url='http://s3.amazonaws.com/nuremberg-documents/%(url)s'))
        HttpProxy.as_view(base_url='http://s3.amazonaws.com/nuremberg-documents')),
    url(r'^robots.txt$', lambda r: HttpResponse("User-agent: *\nDisallow: /search/", content_type="text/plain")),
]

handler400 = 'nuremberg.core.views.handler400'
handler403 = 'nuremberg.core.views.handler403'
handler404 = 'nuremberg.core.views.handler404'
handler500 = 'nuremberg.core.views.handler500'
Ejemplo n.º 9
0
    url(r"^timeline/", include("timeline.urls")),
    url(r"^alerts/", include("adminalerts.urls")),
    url(r"^siteinfo/", include("siteinfo.urls")),
    url(r"^userprofile/", include("userprofile.urls")),
    url(r"^tokens/", include("tokens.urls")),  # will go to SODAR-core
    # The rendered Sphinx-based manual.
    url(r"^manual/", include("docs.urls")),
    url(r"^su/", include("django_su.urls")),
    url(r"^cohorts/", include("cohorts.urls")),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

# Augment url patterns with
urlpatterns += [
    url(
        r"^proxy/panelapp/(?P<url>.*)$",
        HttpProxy.as_view(
            base_url="https://panelapp.genomicsengland.co.uk/api"),
    )
]

if settings.DEBUG:
    # This allows the error pages to be debugged during development, just visit
    # these url in browser to see how these error pages look like.
    urlpatterns += [
        url(r"^400/$",
            default_views.bad_request,
            kwargs={"exception": Exception("Bad Request!")}),
        url(
            r"^403/$",
            default_views.permission_denied,
            kwargs={"exception": Exception("Permission Denied")},
        ),
Ejemplo n.º 10
0
    'pois': PoiSitemap(),
}

urlpatterns = [
    url(r'^$', mapa_view, name="mapa_view"),
    url(r'^misto/(?P<poi_id>\d+)/$', mapa_view, name="mapa_view"),
    url(r'^kml/([-\w]+)/$', kml_view, name="kml_view"),
    url(r'^popup/(\d+)/$', popup_view, name="popup_view"),
    url(r'^uzavirky/$', uzavirky_view, name="uzavirky_view"),
    url(r'^uzavirky/feed/$', UzavirkyFeed(), name="uzavirky_feed"),
    url(r'^novinky/feed/$', NovinkyFeed(), name="novinky_feed"),
    url(r'^metro/$', metro_view, name="metro_view"),
    url(r'^znacky/$', znacky_view, name="znacky_view"),
    url(r'^panel-mapa/$', PanelMapaView.as_view(), name="panel_mapa_view"),
    url(r'^panel-informace/$', PanelInformaceView.as_view(), name="panel_informace_view"),
    url(r'^panel-hledani/$', PanelHledaniView.as_view(), name="panel_hledani_view"),
    url(r'^popup-list/$', PopupListView.as_view(), name="popup-list"),
    url(r'^comments/', include('fluent_comments.urls')),
    url(r'^comments/feeds/latest/$', LatestCommentFeed(), name="latest_comments_feed"),
    url(r'^robots.txt$', lambda r: HttpResponse("User-agent: *\nDisallow: /popup-list\nDisallow: /popup/*\nUser-agent: LinkChecker\nAllow:", content_type="text/plain")),
    url(r'^sitemap\.xml$', cache_page(24 * 60 * 60)(sitemap), {'sitemaps': sitemaps}, name='sitemap'),

    # Redirect from most frequent error links
    url(r'^jak-na-to$', RedirectView.as_view(url='http://prahounakole.cz/jak-do-mesta/deset-zasad-jak-zacit/', permanent=True)),
]

if settings.ENABLE_API_PROXY:
    urlpatterns += [
        url(r'^(?P<url>api/.*)$', HttpProxy.as_view(base_url=settings.PROXY_BASE_URL)),
    ]
Ejemplo n.º 11
0
        name="panel_informace_view"),
    url(r'^panel-hledani/$',
        PanelHledaniView.as_view(),
        name="panel_hledani_view"),
    url(r'^popup-list/$', PopupListView.as_view(), name="popup-list"),
    url(r'^comments/', include('fluent_comments.urls')),
    url(r'^comments/feeds/latest/$',
        LatestCommentFeed(),
        name="latest_comments_feed"),
    url(
        r'^robots.txt$', lambda r: HttpResponse(
            "User-agent: *\nDisallow: /popup-list\nDisallow: /popup/*\nUser-agent: LinkChecker\nAllow:",
            content_type="text/plain")),
    url(r'^sitemap\.xml$',
        cache_page(24 * 60 * 60)(sitemap), {'sitemaps': sitemaps},
        name='sitemap'),

    # Redirect from most frequent error links
    url(
        r'^jak-na-to$',
        RedirectView.as_view(
            url='http://prahounakole.cz/jak-do-mesta/deset-zasad-jak-zacit/',
            permanent=True)),
]

if settings.ENABLE_API_PROXY:
    urlpatterns += [
        url(r'^(?P<url>api/.*)$',
            HttpProxy.as_view(base_url=settings.PROXY_BASE_URL)),
    ]
Ejemplo n.º 12
0
import mysite.profile.views
import mysite.customs.api
import mysite.profile.api
import mysite.missions.svn.views
import mysite.missions.setup.views

from mysite.base.feeds import RecentActivityFeed


urlpatterns = patterns(
    "",
    # Okay, sometimes people link /, or /) because of bad linkification
    # if so, just permit it as a redirect.
    (r"^,$", lambda x: HttpResponsePermanentRedirect("/")),
    (r"^\)$", lambda x: HttpResponsePermanentRedirect("/")),
    (r"^blog/(?P<url>.*)", HttpProxy.as_view(base_url="http://blog.openhatch.org")),
    (r"^bugs/?$", lambda x: HttpResponsePermanentRedirect("https://github.com/openhatch/oh-mainline/issues/")),
    (
        r"^bugs/(?P<number>\d+)$",
        lambda x, number: HttpResponsePermanentRedirect(
            "https://github.com/openhatch/oh-mainline/issues/{}".format(int(number) + 315)
        ),
    ),
    url(r"^forum(?P<path>($|/.*))", RedirectView.as_view(url="http://forum.openhatch.org%(path)s")),
    (r"^wiki$", lambda x: redirect("/wiki/")),
    (r"^w(iki)?(?P<path>($|/.*))", RedirectView.as_view(url="http://wiki.openhatch.org%(path)s")),
    (r"^contact/?$", lambda x: redirect("/wiki/Contact")),
    (r"^policies-etc/?$", lambda x: redirect("/wiki/Privacy_policy")),
    (r"^source-code-etc/?$", lambda x: redirect("/wiki/Category:Hacking_OpenHatch")),
    (r"^colophon/?$", lambda x: redirect("/wiki/About_OpenHatch")),
    (r"^about/?$", lambda x: redirect("/wiki/About_OpenHatch")),
Ejemplo n.º 13
0
from django.conf.urls import patterns, include, url
from django.contrib import admin

from httpproxy.views import HttpProxy

urlpatterns = patterns(
    '',
    url(r'^python/(?P<url>.*)$',
        HttpProxy.as_view(base_url='http://python.org/', rewrite=True)),
    url(r'^admin/', include(admin.site.urls)),
)
Ejemplo n.º 14
0
from httpproxy.views import HttpProxy
from django.views.generic.base import RedirectView
from django.http import HttpResponse

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^transcripts/', include('nuremberg.transcripts.urls')),
    url(r'^documents/', include('nuremberg.documents.urls')),
    url(r'^photographs/', include('nuremberg.photographs.urls')),
    url(r'^search/', include('nuremberg.search.urls')),
    url(r'^', include('nuremberg.content.urls')),
    url(
        r'^proxy_image/printing/(?P<url>.*)$',
        # RedirectView.as_view(url='http://nuremberg.law.harvard.edu/imagedir/HLSL_NUR_printing/%(url)s')),
        HttpProxy.as_view(
            base_url=
            'http://nuremberg.law.harvard.edu/imagedir/HLSL_NUR_printing')),
    url(
        r'^proxy_image/(?P<url>.*)$',
        # RedirectView.as_view(url='http://s3.amazonaws.com/nuremberg-documents/%(url)s'))
        HttpProxy.as_view(
            base_url='http://s3.amazonaws.com/nuremberg-documents')),
    url(
        r'^robots.txt$',
        lambda r: HttpResponse("User-agent: *\nDisallow: /search/",
                               content_type="text/plain")),
]

handler400 = 'nuremberg.core.views.handler400'
handler403 = 'nuremberg.core.views.handler403'
handler404 = 'nuremberg.core.views.handler404'
Ejemplo n.º 15
0
def iamquang95(request, url):
    return HttpProxy.as_view(base_url=BASE, rewrite=True)(request, url)
Ejemplo n.º 16
0
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.http import HttpResponse
from django.contrib.auth import views as auth_views
import pages.views

from httpproxy.views import HttpProxy

admin.autodiscover()

urlpatterns = [
    url(r'^$', pages.views.home),
    url(r'^search$', pages.views.search, name='search'),
    url(r'^documents/(?P<url>.*)$',
        HttpProxy.as_view(base_url=settings.DOCUMENTS_URL)),
    url(r'^organisations/$', pages.views.organisations, name='organisations'),
    url(r'^organisation/(?P<key>[:\w\d_-]{1,256})/$',
        pages.views.organisation,
        name='organisation'),
    url(r'^organisation/(?P<key>[:\w\d_-]{1,256})/pages$',
        pages.views.organisation_pages,
        name='organisation_pages'),
    url(r'^organisation/(?P<key>[:\w\d_-]{1,256})/attachments/$',
        pages.views.organisation_attachments,
        name='organisation_attachments'),
    url(r'^organisation/(?P<key>[:\w\d_-]{1,256})/history/$',
        pages.views.history,
        name='organisation_history'),
    url(r'^organisation/(?P<key>[:\w\d_-]{1,256})/history/(?P<date>\d{4}-\d{2}-\d{2})$',
        pages.views.organisation_history_date,
Ejemplo n.º 17
0
"""avtozip URL Configuration."""

from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin

from httpproxy.views import HttpProxy

from webstore.api.urls import webstore_api

from . import views


urlpatterns = [
    url(r'^$', views.dashboard_view, name='index'),
    url(r'^admin/', admin.site.urls),
    url(r'^api/', include(webstore_api.urls)),
    url(r'^webstore/', include('webstore.urls', namespace='webstore')),
    url(r'^rosetta/', include('rosetta.urls')),
    url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^tecdoc/(?P<url>.*)$', HttpProxy.as_view(base_url=settings.PROXY_TECDOC_URL)),
]
Ejemplo n.º 18
0
from django.conf.urls import patterns, include, url
from django.contrib import admin

from httpproxy.views import HttpProxy


urlpatterns = patterns('',
    url(r'^python/(?P<url>.*)$',
            HttpProxy.as_view(base_url='http://python.org/', rewrite=True)),

    url(r'^admin/', include(admin.site.urls)),
)
Ejemplo n.º 19
0
import mysite.profile.views
import mysite.customs.api
import mysite.profile.api
import mysite.missions.svn.views
import mysite.missions.setup.views

from mysite.base.feeds import RecentActivityFeed

urlpatterns = patterns(
    '',
    # Okay, sometimes people link /, or /) because of bad linkification
    # if so, just permit it as a redirect.
    (r'^,$', lambda x: HttpResponsePermanentRedirect('/')),
    (r'^\)$', lambda x: HttpResponsePermanentRedirect('/')),
    (r'^blog/(?P<url>.*)',
     HttpProxy.as_view(base_url='http://blog.openhatch.org')),
    (r'^bugs/?$', lambda x: HttpResponsePermanentRedirect(
        'https://github.com/openhatch/oh-mainline/issues/')),
    (r'^bugs/(?P<number>\d+)$',
     lambda x, number: HttpResponsePermanentRedirect(
         'https://github.com/openhatch/oh-mainline/issues/{}'.format(
             int(number) + 315))),
    url(r'^forum(?P<path>($|/.*))',
        RedirectView.as_view(url='http://forum.openhatch.org%(path)s')),
    (r'^wiki$', lambda x: redirect('/wiki/')),
    (r'^(?P<url>w(iki)?($|/.*))',
     HttpProxy.as_view(base_url='http://wiki.openhatch.org')),
    (r'^contact/?$', lambda x: redirect('/wiki/Contact')),
    (r'^policies-etc/?$', lambda x: redirect('/wiki/Privacy_policy')),
    (r'^source-code-etc/?$',
     lambda x: redirect('/wiki/Category:Hacking_OpenHatch')),
Ejemplo n.º 20
0
    url(r'^lucky/', include('games.luckyawards.urls')),
    url(r'^home/$', home, name='home_page'),
    url(r'^$', home),
    url(r'^top_monitor\.html$',
        csrf_exempt(TemplateView.as_view(template_name='top_monitor.html'))),
    url(r'^download/(?P<path>.*)$', staff_member_required(serve), {
        'document_root': settings.DOWNLOAD_ROOT,
        'show_indexes': True
    }),
    url(r'^rest/', include('flashsale.restpro.urls')),
    url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
    url(r'^apis/', include('shopmanager.urls_api')),
    url(r'^outware/', include('shopback.outware.urls_out')),
    url(
        r'^qrcode/(?P<url>.*)',
        HttpProxy.as_view(base_url='http://%s/qrcode' %
                          settings.QINIU_PUBLIC_DOMAIN)),
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^MP_verify_(?P<verify_string>.*).txt',
        weixin_mpverify,
        name="weixin_mpverify"),
    url('', include('django_prometheus.urls')),
    url(r'^admin/', include(admin.site.urls)),
]

if settings.DEBUG == True:
    from django.views.static import serve

    urlpatterns += [
        url(r'^static/(?P<path>.*)$', serve,
            {'document_root': settings.STATIC_DOC_ROOT}),
        url(r'^media/(?P<path>.*)$', serve,
Ejemplo n.º 21
0
from django.conf.urls import url
from django.conf import settings
from httpproxy.views import HttpProxy
from . import views

urlpatterns = [
    # ex: /fuzzysearch/
    url(r'^$', views.index, name='index'),
    # The proxy for SRCH2 endpoint
    url(r'^srch2/(?P<url>.*)$',
        HttpProxy.as_view(base_url=settings.CONFIG['SRCH2'])),
]
Ejemplo n.º 22
0
from django.conf.urls import url
from django.conf.urls import patterns
from django.conf import settings
from . import views
from httpproxy.views import HttpProxy

urlpatterns = [
    url(r"^$", views.post_list, name="post_list"),
    url(r"^post/(?P<num>[0-9]+)/$", views.post_detail, name="post_detail"),
    url(r"^post/new/$", views.post_new, name="post_new"),
    url(r"^post/(?P<num>[0-9]+)/edit/$", views.post_edit, name="post_edit"),
    url(r"^post/(?P<num>[0-9]+)/delete/$", views.post_delete, name="post_delete"),
    url(r"^manga/(?P<num>[0-9]+)/$", views.manga_general, name="manga_general"),
    url(r"^(?P<manga>[0-9]+)/(?P<numb>[0-9]+)/$", views.manga_page, name="manga_page"),
    url(r"^shop/$", views.shop, name="shop"),
]
if settings.DEBUG:
    urlpatterns += patterns(
        "django.views.static", (r"pages/(?P<path>.*)", "serve", {"document_root": settings.MEDIA_ROOT})
    )
    urlpatterns += patterns("", (r"^proxy/(?P<url>.*)$", HttpProxy.as_view(base_url="http://www.python.org/")))
Ejemplo n.º 23
0
from django.conf.urls import url, patterns
from httpproxy.views import HttpProxy

from . import api
from . import newJobApi, blockApi, toolApi, credentialsApi, segmentationApi, dashboardApi

urlpatterns = patterns(
    '',
    url(r'^$', api.test, name='test'),
    url(r'^hproxy/(?P<url>.*)$', HttpProxy.as_view(base_url='http://hymnary.org/')),

    url(r'^query', toolApi.get_pipeline, name='query'),
    url(r'^job_update', toolApi.job_update, name='job_update'),

    url(r'^block_list/block', blockApi.block, name='block'),
    url(r'^block_list/upload', blockApi.block_list_csv, name='block_upload'),
    url(r'^block_list/count', blockApi.get_counts, name='block_count'),
    url(r'^block_list', blockApi.get_blocked, name='get_blocked'),

    url(r'^interface/login$', credentialsApi.login, name='interface.login'),

    url(r'^interface/job/new$', newJobApi.form_post, name='interface.post'),
    url(r'^interface/job/cancel$', dashboardApi.cancel_job, name='interface.cancel'),
    url(r'^interface/job/segment/new$', segmentationApi.post_segment_form, name='interface.segment'),
    url(r'^interface/job/segments$', segmentationApi.get_segment_jobs, name='interface.segment_all'),
    url(r'^interface/job/testing_message$', newJobApi.schedule_testing_send, name='interface.post_test'),

    url(r'^interface/form$', newJobApi.get_form_data, name='interface.form'),
    url(r'^interface/jobs$', dashboardApi.get_jobs, name='interface.jobs'),
    url(r'^interface/dummy/form$', newJobApi.get_sample_form_data, name='interface.sample_form'),
    url(r'^configuration/(?P<namespace>\w+)/(?P<key>.*)$', api.get_conf, name='configurations'),
Ejemplo n.º 24
0
#from revproxy.views import ProxyView
from django.conf import settings
import django.contrib.auth.views

urlpatterns = [
    url(r'^$', views.datasets_list, name='datasets_list'),
    url(r'^(\d+)/$', views.dataset_list, name='dataset_list'),
    url(r'^newdataset/$', views.dataset_form, name='dataset_new'),
    url(r'^removedataset/(\d+)/$', views.remove_dataset, name='dataset_remove'),
    url(r'^updateimage/$', views.update_image, name='dataset_remove'),
    url(r'^emptytrash/$', views.empty_trash, name='empty_trash'),
    url(r'^vrtdataset/(\d+)/$', views.vrt_dataset, name='dataset_vrt'),
    url(r'^download_dataset/(\d+)/$', views.download_dataset, name='dataset_download'),
    url(r'^clone_dataset/(\d+)/$', views.clone_dataset, name='dataset_clone'),
    url(r'^editdataset/(?P<datasetId>\d+)/$', views.dataset_form, name='dataset_form'),
    url(r'^viewdataset/(?P<datasetId>\d+)/$', views.dataset_view, name='dataset_view'),
    url(r'^newimage/(?P<datasetId>\d+)/$', views.georef_start, name='georef_new'),
    url(r'^trashimage/(\d+)/$', views.trash_image, name='georef_trash'),
    url(r'^recoverimage/(\d+)/$', views.recover_image, name='georef_recover'),
    url(r'^imgset/(?P<idx>\d+)/$', views.georef_start, name='georef_start'),
    url(r'^apply/$', views.georef_apply, name='georef_apply'),
    url(r'^print/(\d+)/$', views.georef_print, name='georef_print'),
    url(r'^proxy/(?P<url>.*)', HttpProxy.as_view(base_url="")),
    url(r'^export/$', views.export, name='export'),
    #url(r'^proxy/(?P<path>.*)', ProxyView.as_view(upstream='https://')),
    url(r'^login/', django.contrib.auth.views.login),
    url(r'^logout/', django.contrib.auth.views.logout),
    #url(r'raster/', include('raster.urls')),
    #url(r'^wms/$', testWmsView.as_view(), name='wms'),
]