repo_description: YT Navigator: AI-powered YouTube content explorer that lets you search and chat with channel videos using AI agents. Extract insights from hours of content in seconds with semantic search and precise timestamps.
repo_topics: agentic-ai agentic-rag ai django langchain langgraph llm python rag reranking youtube youtube-bot
code: """Views for the profile app."""
  
  from django.contrib import messages
  from django.contrib.auth.decorators import login_required
  from django.shortcuts import (
      redirect,
      render,
  )
  
  
  @login_required
  def profile_view(request):
      """Profile view."""
      if request.method == "POST":
          username = request.POST.get("username")
          email = request.POST.get("email")
  
          # Update user profile
          request.user.username = username
          request.user.email = email
          request.user.save()
  
          messages.success(request, "Profile updated successfully!")
          return redirect("profile")
  
      return render(request, "profile.html")
  