code: def add_announcement_view(request):
      
      if request.method == "POST":
          form = AnnouncementForm(request.POST)
          logger.debug(form)
          if form.is_valid():
              obj = form.save()
              obj.user = request.user
              # SAFE HTML
              obj.content = safe_html(obj.content)
              obj.save()
              announcement_posted_hook(request, obj)
              messages.success(request, "Successfully added announcement.")
              return redirect("index")
          else:
              messages.error(request, "Error adding announcement")
      else:
          form = AnnouncementForm()
      return render(request, "announcements/add_modify.html", {"form": form, "action": "add"})
docs: Add an announcement.