0

I am fairly new to the Django framework and for a couple of hours I was getting TemplateNotFound error returned when I tried to map my views.py to my templates directory. This issue was eventually solved just by inputting 'r' before my path to templates in os.path.join(BASE_DIR, 'templates') to become os.path.join(BASE_DIR, r'templates'). I really want to understand better what function it carries out on the string. what is the big idea?

Omah
  • 17
  • 2
  • 1
    No, `r'templates'` is functionally identical to `'templates'`. Either the string was something different or your problem must have been something else. – khelwood Apr 22 '21 at 10:48
  • Does [this](https://docs.python.org/3/tutorial/introduction.html#strings) help? – vojtam Apr 22 '21 at 10:49

0 Answers0