[tasks] Fix todoist login link on settings
Some checks failed
build & deploy / deploy (push) Has been cancelled
build & deploy / test (push) Has been cancelled

This commit is contained in:
2026-04-01 12:07:18 -04:00
parent 78651af802
commit 9ce6dd8876
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -146,7 +146,7 @@
<a href="{% url 'tasks:task_todoist_auth' %}" class="btn btn-sm btn-secondary">Reconnect to Todoist</a>
{% else %}
<p>Not connected</p>
<a href="{% url 'tasks:task_todoist_auth' %}" class="btn btn-sm btn-primary">Connect to Todoist</a>
<a href="{{todoist_oauth_url}}" class="btn btn-sm btn-primary">Connect to Todoist</a>
{% endif %}
</div>
{% endblock %}