python - What is the difference between r'' and r'^$' in regex for Django URLs? -


I have a urls.py file that has a line like this:

  urlpatterns =   

Why is it that when I change the middle line url (r '^ $', include ('my_module.urls')) this job does not do?

Is not this reged for the (empty) value?

whenever the Django is included () ( django Conf.urls.include () ), it matches any part of that UPS to that point and sends the remaining string to the remaining URL for further processing. But $ means that the URL has ended here, so there is no thing to cut in and send it after $ .

Click for more information

Comments

Popular posts from this blog

Out of index C/C++ -

regex - PatternSyntaxException: while using String.ReplaceAll function in java? -

java - Projects which are accessed via multiple (different) IDEs: Ant or Maven? -