I have a page that has a simple form. When I submit this form I am redirected to the same page with the new objects created. I'd like to add inline links to the right of every object created to delete and edit. Would I do this with django or would I use javascript/AJAX to handle this? I'm just a little confused on the approach that I should take. Any suggestions?
Here's what my view currently looks like:
def events(request):
the_user = User.objects.get(username=request.user)
event_list = Event.objects.filter(user=the_user)
if request.POST:
form = EventForm(request.POST)
if form.is_valid():
form.save()
else:
form = EventForm(initial={'user':the_user})
return render_to_response("events/event_list.html", {
"form": form,
"event_list": event_list,
}, context_instance=RequestContext(request))