diff --git a/vrobbler/apps/profiles/views.py b/vrobbler/apps/profiles/views.py index f6e2175..4dfb1a4 100644 --- a/vrobbler/apps/profiles/views.py +++ b/vrobbler/apps/profiles/views.py @@ -3,6 +3,7 @@ from django.http.response import HttpResponseBadRequest from django.urls import reverse_lazy from django.views.generic import FormView from profiles.forms import UserProfileForm +from tasks.todoist import generate_todoist_oauth_url class ProfileFormView(LoginRequiredMixin, FormView): @@ -27,4 +28,5 @@ class ProfileFormView(LoginRequiredMixin, FormView): context = super().get_context_data(**kwargs) context["user_id"] = self.request.user.id context["profile"] = self.request.user.profile + context["todoist_oauth_url"] = generate_todoist_oauth_url(self.request.user.id) return context diff --git a/vrobbler/templates/profiles/settings_form.html b/vrobbler/templates/profiles/settings_form.html index 5732b8c..579dc83 100644 --- a/vrobbler/templates/profiles/settings_form.html +++ b/vrobbler/templates/profiles/settings_form.html @@ -146,7 +146,7 @@ Reconnect to Todoist {% else %}
Not connected
- Connect to Todoist + Connect to Todoist {% endif %} {% endblock %}