diff --git a/.env.example b/.env.example index 994ea9a16..f0231e541 100644 --- a/.env.example +++ b/.env.example @@ -22,3 +22,7 @@ DATABASE_URL=postgres://user:password@localhost:5432/dbname #Sentry DSN SENTRY_DSN=https://examplePublicKey@o0.ingest.sentry.io/0 + + +SLACK_CLIENT_ID= +SLACK_CLIENT_SECRET= diff --git a/blt/settings.py b/blt/settings.py index 73188bd5a..12e6228a2 100644 --- a/blt/settings.py +++ b/blt/settings.py @@ -268,6 +268,8 @@ REPORT_EMAIL_PASSWORD = os.environ.get("REPORT_PASSWORD", "blank") # these settings are only for production / Heroku +TESTING = True +SECURE_SSL_REDIRECT = False if "DYNO" in os.environ: print("database url detected in settings") DEBUG = False diff --git a/blt/urls.py b/blt/urls.py index 486185fb6..2da525dc1 100644 --- a/blt/urls.py +++ b/blt/urls.py @@ -15,7 +15,7 @@ import comments.views from blt import settings -from company.views import ShowBughuntView +from company.views import ShowBughuntView, SlackCallbackView from website.api.views import ( ActivityLogViewSet, AuthApiViewset, @@ -232,11 +232,13 @@ path("auth/google/", GoogleLogin.as_view(), name="google_login"), path("accounts/github/login/callback/", github_callback, name="github_callback"), path("accounts/google/login/callback/", google_callback, name="google_callback"), + path("accounts/google/login/callback/", google_callback, name="google_callback"), path("accounts/facebook/login/callback/", facebook_callback, name="facebook_callback"), re_path(r"^auth/facebook/connect/$", FacebookConnect.as_view(), name="facebook_connect"), re_path(r"^auth/github/connect/$", GithubConnect.as_view(), name="github_connect"), re_path(r"^auth/google/connect/$", GoogleConnect.as_view(), name="google_connect"), path("auth/github/url/", github_views.oauth2_login), + path("oauth/slack/callback/", SlackCallbackView.as_view(), name="slack_callback"), path("auth/google/url/", google_views.oauth2_login), path("auth/facebook/url/", facebook_views.oauth2_callback), path("socialaccounts/", SocialAccountListView.as_view(), name="social_account_list"), diff --git a/company/templates/company/add_slack_integration.html b/company/templates/company/add_slack_integration.html new file mode 100644 index 000000000..1da0210d1 --- /dev/null +++ b/company/templates/company/add_slack_integration.html @@ -0,0 +1,90 @@ +{% extends "company/company_dashboard_base.html" %} +{% block title %} + Add Slack Integration +{% endblock title %} +{% block body %} +
Add Slack Integration
+Manage Integrations
++ Service Name: Daily Sizzle Timelogs Status +
++ Daily Update Time: {{ slack_integration.daily_update_time }} (UTC) +
++ Channel Name: #{{ slack_integration.default_channel_name }} +
+ {% endif %} + Edit + + {% else %} + No integrations found. +