The path
method is the full match method, so when your path will be exactly as described, you will have the possibility to handle the request with the view that you've described.
The re_path
allows you more control with regular expressions.
Let's extend your example r"^index/?$"
, here "?" sign allows the user to use the trailing slash "/" at the end of the URL or not use.
You can play with regexp here: https://regex101.com
The Django documentation about re_path is here: https://docs.djangoproject.com/en/dev/topics/http/urls/#using-regular-expressions
The business needs could be very complex and maybe you won't be able to make a match for a needed URL format with just the path
features, but in 99% this option will be enough.