[tasks] Fix todoist login link on settings
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user