@ -1,36 +1,36 @@ | |||
from django.conf.urls import url | |||
from django.urls import path | |||
from hc.accounts import views | |||
urlpatterns = [ | |||
url(r'^login/$', views.login, name="hc-login"), | |||
url(r'^logout/$', views.logout, name="hc-logout"), | |||
url(r'^login_link_sent/$', | |||
views.login_link_sent, name="hc-login-link-sent"), | |||
path('login/', views.login, name="hc-login"), | |||
path('logout/', views.logout, name="hc-logout"), | |||
path('login_link_sent/', | |||
views.login_link_sent, name="hc-login-link-sent"), | |||
url(r'^link_sent/$', | |||
views.link_sent, name="hc-link-sent"), | |||
path('link_sent/', | |||
views.link_sent, name="hc-link-sent"), | |||
url(r'^check_token/([\w-]+)/([\w-]+)/$', | |||
views.check_token, name="hc-check-token"), | |||
path('check_token/<slug:username>/<slug:token>/', | |||
views.check_token, name="hc-check-token"), | |||
url(r'^profile/$', views.profile, name="hc-profile"), | |||
url(r'^profile/notifications/$', views.notifications, name="hc-notifications"), | |||
url(r'^profile/badges/$', views.badges, name="hc-badges"), | |||
url(r'^close/$', views.close, name="hc-close"), | |||
path('profile/', views.profile, name="hc-profile"), | |||
path('profile/notifications/', views.notifications, name="hc-notifications"), | |||
path('profile/badges/', views.badges, name="hc-badges"), | |||
path('close/', views.close, name="hc-close"), | |||
url(r'^unsubscribe_reports/([\w\:-]+)/$', | |||
views.unsubscribe_reports, name="hc-unsubscribe-reports"), | |||
path('unsubscribe_reports/<str:username>/', | |||
views.unsubscribe_reports, name="hc-unsubscribe-reports"), | |||
url(r'^set_password/([\w-]+)/$', | |||
views.set_password, name="hc-set-password"), | |||
path('set_password/<slug:token>/', | |||
views.set_password, name="hc-set-password"), | |||
url(r'^change_email/done/$', | |||
views.change_email_done, name="hc-change-email-done"), | |||
path('change_email/done/', | |||
views.change_email_done, name="hc-change-email-done"), | |||
url(r'^change_email/([\w-]+)/$', | |||
views.change_email, name="hc-change-email"), | |||
path('change_email/<slug:token>/', | |||
views.change_email, name="hc-change-email"), | |||
url(r'^switch_team/([\w-]+)/$', | |||
views.switch_team, name="hc-switch-team"), | |||
path('switch_team/<slug:target_username>/', | |||
views.switch_team, name="hc-switch-team"), | |||
] |
@ -1,27 +1,27 @@ | |||
from django.conf.urls import url | |||
from django.urls import path | |||
from hc.api import views | |||
urlpatterns = [ | |||
url(r'^ping/([\w-]+)/$', views.ping, name="hc-ping-slash"), | |||
url(r'^ping/([\w-]+)$', views.ping, name="hc-ping"), | |||
url(r'^api/v1/checks/$', views.checks), | |||
url(r'^api/v1/checks/([\w-]+)$', views.update, name="hc-api-update"), | |||
url(r'^api/v1/checks/([\w-]+)/pause$', views.pause, name="hc-api-pause"), | |||
url(r'^api/v1/notifications/([\w-]+)/bounce$', views.bounce, | |||
name="hc-api-bounce"), | |||
path('ping/<uuid:code>/', views.ping, name="hc-ping-slash"), | |||
path('ping/<uuid:code>', views.ping, name="hc-ping"), | |||
path('api/v1/checks/', views.checks), | |||
path('api/v1/checks/<uuid:code>', views.update, name="hc-api-update"), | |||
path('api/v1/checks/<uuid:code>/pause', views.pause, name="hc-api-pause"), | |||
path('api/v1/notifications/<uuid:code>/bounce', views.bounce, | |||
name="hc-api-bounce"), | |||
url(r'^badge/([\w-]+)/([\w-]{8})/([\w-]+).svg$', views.badge, | |||
name="hc-badge"), | |||
path('badge/<slug:username>/<slug:signature>/<slug:tag>.svg', views.badge, | |||
name="hc-badge"), | |||
url(r'^badge/([\w-]+)/([\w-]{8}).svg$', views.badge, | |||
{"tag": "*"}, name="hc-badge-all"), | |||
path('badge/<slug:username>/<slug:signature>.svg', views.badge, | |||
{"tag": "*"}, name="hc-badge-all"), | |||
url(r'^badge/([\w-]+)/([\w-]{8})/([\w-]+).json$', views.badge, | |||
{"format": "json"}, name="hc-badge-json"), | |||
path('badge/<slug:username>/<slug:signature>/<slug:tag>.json', views.badge, | |||
{"format": "json"}, name="hc-badge-json"), | |||
url(r'^badge/([\w-]+)/([\w-]{8}).json$', views.badge, | |||
{"format": "json", "tag": "*"}, name="hc-badge-json-all"), | |||
path('badge/<slug:username>/<slug:signature>.json', views.badge, | |||
{"format": "json", "tag": "*"}, name="hc-badge-json-all"), | |||
url(r'^api/v1/status/$', views.status), | |||
path('api/v1/status/', views.status), | |||
] |
@ -38,7 +38,7 @@ class LogTestCase(BaseTestCase): | |||
self.client.login(username="[email protected]", password="password") | |||
r = self.client.get(url) | |||
assert r.status_code == 400 | |||
self.assertEqual(r.status_code, 404) | |||
def test_it_handles_missing_uuid(self): | |||
# Valid UUID but there is no check for it: | |||
@ -31,7 +31,7 @@ class RemoveChannelTestCase(BaseTestCase): | |||
self.client.login(username="[email protected]", password="password") | |||
r = self.client.post(url) | |||
assert r.status_code == 400 | |||
self.assertEqual(r.status_code, 404) | |||
def test_it_checks_owner(self): | |||
url = "/integrations/%s/remove/" % self.channel.code | |||
@ -32,7 +32,7 @@ class RemoveCheckTestCase(BaseTestCase): | |||
self.client.login(username="[email protected]", password="password") | |||
r = self.client.post(url) | |||
assert r.status_code == 400 | |||
self.assertEqual(r.status_code, 404) | |||
def test_it_checks_owner(self): | |||
url = "/checks/%s/remove/" % self.check.code | |||
@ -46,7 +46,7 @@ class UpdateNameTestCase(BaseTestCase): | |||
self.client.login(username="[email protected]", password="password") | |||
r = self.client.post(url, data=payload) | |||
assert r.status_code == 400 | |||
self.assertEqual(r.status_code, 404) | |||
def test_it_handles_missing_uuid(self): | |||
# Valid UUID but there is no check for it: | |||
@ -128,7 +128,7 @@ class UpdateTimeoutTestCase(BaseTestCase): | |||
self.client.login(username="[email protected]", password="password") | |||
r = self.client.post(url, data=payload) | |||
assert r.status_code == 400 | |||
self.assertEqual(r.status_code, 404) | |||
def test_it_handles_missing_uuid(self): | |||
# Valid UUID but there is no check for it: | |||
@ -1,55 +1,55 @@ | |||
from django.conf.urls import include, url | |||
from django.urls import include, path | |||
from hc.front import views | |||
check_urls = [ | |||
url(r'^name/$', views.update_name, name="hc-update-name"), | |||
url(r'^timeout/$', views.update_timeout, name="hc-update-timeout"), | |||
url(r'^pause/$', views.pause, name="hc-pause"), | |||
url(r'^remove/$', views.remove_check, name="hc-remove-check"), | |||
url(r'^log/$', views.log, name="hc-log"), | |||
url(r'^last_ping/$', views.ping_details, name="hc-last-ping"), | |||
url(r'^pings/([\d]+)/$', views.ping_details, name="hc-ping-details"), | |||
path('name/', views.update_name, name="hc-update-name"), | |||
path('timeout/', views.update_timeout, name="hc-update-timeout"), | |||
path('pause/', views.pause, name="hc-pause"), | |||
path('remove/', views.remove_check, name="hc-remove-check"), | |||
path('log/', views.log, name="hc-log"), | |||
path('last_ping/', views.ping_details, name="hc-last-ping"), | |||
path('pings/<int:n>/', views.ping_details, name="hc-ping-details"), | |||
] | |||
channel_urls = [ | |||
url(r'^$', views.channels, name="hc-channels"), | |||
url(r'^add_email/$', views.add_email, name="hc-add-email"), | |||
url(r'^add_webhook/$', views.add_webhook, name="hc-add-webhook"), | |||
url(r'^add_pd/$', views.add_pd, name="hc-add-pd"), | |||
url(r'^add_pd/([\w]{12})/$', views.add_pd, name="hc-add-pd-state"), | |||
url(r'^add_pagertree/$', views.add_pagertree, name="hc-add-pagertree"), | |||
url(r'^add_slack/$', views.add_slack, name="hc-add-slack"), | |||
url(r'^add_slack_btn/$', views.add_slack_btn, name="hc-add-slack-btn"), | |||
url(r'^add_hipchat/$', views.add_hipchat, name="hc-add-hipchat"), | |||
url(r'^hipchat/capabilities/$', views.hipchat_capabilities, name="hc-hipchat-capabilities"), | |||
url(r'^add_pushbullet/$', views.add_pushbullet, name="hc-add-pushbullet"), | |||
url(r'^add_discord/$', views.add_discord, name="hc-add-discord"), | |||
url(r'^add_pushover/$', views.add_pushover, name="hc-add-pushover"), | |||
url(r'^add_opsgenie/$', views.add_opsgenie, name="hc-add-opsgenie"), | |||
url(r'^add_victorops/$', views.add_victorops, name="hc-add-victorops"), | |||
url(r'^telegram/bot/$', views.telegram_bot, name="hc-telegram-webhook"), | |||
url(r'^add_telegram/$', views.add_telegram, name="hc-add-telegram"), | |||
url(r'^add_sms/$', views.add_sms, name="hc-add-sms"), | |||
url(r'^add_zendesk/$', views.add_zendesk, name="hc-add-zendesk"), | |||
url(r'^([\w-]+)/checks/$', views.channel_checks, name="hc-channel-checks"), | |||
url(r'^([\w-]+)/remove/$', views.remove_channel, name="hc-remove-channel"), | |||
url(r'^([\w-]+)/verify/([\w-]+)/$', views.verify_email, | |||
name="hc-verify-email"), | |||
url(r'^([\w-]+)/unsub/([\w-]+)/$', views.unsubscribe_email, | |||
name="hc-unsubscribe-alerts"), | |||
path('', views.channels, name="hc-channels"), | |||
path('add_email/', views.add_email, name="hc-add-email"), | |||
path('add_webhook/', views.add_webhook, name="hc-add-webhook"), | |||
path('add_pd/', views.add_pd, name="hc-add-pd"), | |||
path('add_pd/<str:state>/', views.add_pd, name="hc-add-pd-state"), | |||
path('add_pagertree/', views.add_pagertree, name="hc-add-pagertree"), | |||
path('add_slack/', views.add_slack, name="hc-add-slack"), | |||
path('add_slack_btn/', views.add_slack_btn, name="hc-add-slack-btn"), | |||
path('add_hipchat/', views.add_hipchat, name="hc-add-hipchat"), | |||
path('hipchat/capabilities/', views.hipchat_capabilities, name="hc-hipchat-capabilities"), | |||
path('add_pushbullet/', views.add_pushbullet, name="hc-add-pushbullet"), | |||
path('add_discord/', views.add_discord, name="hc-add-discord"), | |||
path('add_pushover/', views.add_pushover, name="hc-add-pushover"), | |||
path('add_opsgenie/', views.add_opsgenie, name="hc-add-opsgenie"), | |||
path('add_victorops/', views.add_victorops, name="hc-add-victorops"), | |||
path('telegram/bot/', views.telegram_bot, name="hc-telegram-webhook"), | |||
path('add_telegram/', views.add_telegram, name="hc-add-telegram"), | |||
path('add_sms/', views.add_sms, name="hc-add-sms"), | |||
path('add_zendesk/', views.add_zendesk, name="hc-add-zendesk"), | |||
path('<uuid:code>/checks/', views.channel_checks, name="hc-channel-checks"), | |||
path('<uuid:code>/remove/', views.remove_channel, name="hc-remove-channel"), | |||
path('<uuid:code>/verify/<slug:token>/', views.verify_email, | |||
name="hc-verify-email"), | |||
path('<uuid:code>/unsub/<slug:token>/', views.unsubscribe_email, | |||
name="hc-unsubscribe-alerts"), | |||
] | |||
urlpatterns = [ | |||
url(r'^$', views.index, name="hc-index"), | |||
url(r'^checks/$', views.my_checks, name="hc-checks"), | |||
url(r'^checks/add/$', views.add_check, name="hc-add-check"), | |||
url(r'^checks/cron_preview/$', views.cron_preview), | |||
url(r'^checks/status/$', views.status), | |||
url(r'^checks/([\w-]+)/', include(check_urls)), | |||
url(r'^integrations/', include(channel_urls)), | |||
path('', views.index, name="hc-index"), | |||
path('checks/', views.my_checks, name="hc-checks"), | |||
path('checks/add/', views.add_check, name="hc-add-check"), | |||
path('checks/cron_preview/', views.cron_preview), | |||
path('checks/status/', views.status), | |||
path('checks/<uuid:code>/', include(check_urls)), | |||
path('integrations/', include(channel_urls)), | |||
url(r'^docs/$', views.docs, name="hc-docs"), | |||
url(r'^docs/api/$', views.docs_api, name="hc-docs-api"), | |||
url(r'^docs/cron/$', views.docs_cron, name="hc-docs-cron"), | |||
path('docs/', views.docs, name="hc-docs"), | |||
path('docs/api/', views.docs_api, name="hc-docs-api"), | |||
path('docs/cron/', views.docs_cron, name="hc-docs-cron"), | |||
] |
@ -1,39 +1,39 @@ | |||
from django.conf.urls import url | |||
from django.urls import path | |||
from . import views | |||
urlpatterns = [ | |||
url(r'^pricing/$', | |||
views.pricing, | |||
name="hc-pricing"), | |||
path('pricing/', | |||
views.pricing, | |||
name="hc-pricing"), | |||
url(r'^accounts/profile/billing/$', | |||
views.billing, | |||
name="hc-billing"), | |||
path('accounts/profile/billing/', | |||
views.billing, | |||
name="hc-billing"), | |||
url(r'^accounts/profile/billing/history/$', | |||
views.billing_history, | |||
name="hc-billing-history"), | |||
path('accounts/profile/billing/history/', | |||
views.billing_history, | |||
name="hc-billing-history"), | |||
url(r'^accounts/profile/billing/address/$', | |||
views.address, | |||
name="hc-billing-address"), | |||
path('accounts/profile/billing/address/', | |||
views.address, | |||
name="hc-billing-address"), | |||
url(r'^accounts/profile/billing/payment_method/$', | |||
views.payment_method, | |||
name="hc-payment-method"), | |||
path('accounts/profile/billing/payment_method/', | |||
views.payment_method, | |||
name="hc-payment-method"), | |||
url(r'^invoice/pdf/([\w-]+)/$', | |||
views.pdf_invoice, | |||
name="hc-invoice-pdf"), | |||
path('invoice/pdf/<slug:transaction_id>/', | |||
views.pdf_invoice, | |||
name="hc-invoice-pdf"), | |||
url(r'^pricing/set_plan/$', | |||
views.set_plan, | |||
name="hc-set-plan"), | |||
path('pricing/set_plan/', | |||
views.set_plan, | |||
name="hc-set-plan"), | |||
url(r'^pricing/get_client_token/$', | |||
views.get_client_token, | |||
name="hc-get-client-token"), | |||
path('pricing/get_client_token/', | |||
views.get_client_token, | |||
name="hc-get-client-token"), | |||
url(r'^pricing/charge/$', views.charge_webhook), | |||
path('pricing/charge/', views.charge_webhook), | |||
] |
@ -1,13 +1,13 @@ | |||
from django.conf.urls import include, url | |||
from django.contrib import admin | |||
from django.urls import include, path | |||
from hc.accounts.views import login as hc_login | |||
urlpatterns = [ | |||
url(r'^admin/login/', hc_login, {"show_password": True}), | |||
url(r'^admin/', admin.site.urls), | |||
url(r'^accounts/', include('hc.accounts.urls')), | |||
url(r'^', include('hc.api.urls')), | |||
url(r'^', include('hc.front.urls')), | |||
url(r'^', include('hc.payments.urls')) | |||
path('admin/login/', hc_login, {"show_password": True}), | |||
path('admin/', admin.site.urls), | |||
path('accounts/', include('hc.accounts.urls')), | |||
path('', include('hc.api.urls')), | |||
path('', include('hc.front.urls')), | |||
path('', include('hc.payments.urls')) | |||
] |
@ -1,5 +1,5 @@ | |||
croniter | |||
Django==1.11.6 | |||
Django==2.0.4 | |||
django_compressor==2.1 | |||
psycopg2==2.7.3.2 | |||
pytz==2016.7 | |||