detail() was just a method being used in the example. it is not a built in method.
Have you worked your way through the Official Django Tutorial? It’s explained in there.
I need to better understand how to create a detail method and understand it’s syntax.