1π
β
I donβt understand what you mean by context dictionary here. The context in a view is for rendering a template; you donβt want to do that in your command. And in any case you donβt have a URL in the command, so there is no relationship to the view.
Instead you need to pass an argument, say the slug, to your command, and use that to get the event to delete. The documentation has an example that does almost exactly what you want.
π€Daniel Roseman
Source:stackexchange.com