I am from the Java Hibernate and Symfony2 background where I used to write the routing within the controller on the top of function like this:
/**
* @Route("/blog")
*/
class PostController extends Controller
{
I know its not available in Django but is there any way I can code some decorator etc. so that I can mention the URL like this:
@URL("/mytest")
class myView():
pass
While it would be very undjangonic, you could try something like this:
And make sure every file containing this decorator is imported before processing urls (e.g. by importing them in the urls file).