Forums

Base.html not found

I've just uploaded my first project on pythonanywhere. I'm getting an error message the and Base.html cannot be found:

Here's my code: 1 {% extends 'Base.html' %} 2
3 {% block content %} 4
5 <div class="sub_title_big"> 6 {% if user.is_authenticated %} 7 Welcome {{user.get_username}} 8 {% else %} 9 <a href="{% url 'user_app:Login' %}">Login or Register Here</a> 10 {% endif %} 11 </div> ... I've checked in bash and the file is there, right next to index.html which is where this code is. And one of the folders that it says it's looking in is the folder it's located in.

I'm brand new to this and this is my first try at deploying a django app so I'm open to the possibilty that I missed something but if the file is there I'm not sure what could have gone wrong. Are we limited from extending other files if we have the free version or something like that?

My guess is that it's a case-sensitivity problem. If you've been developing on Windows so far, you would be able to use "Base.html" in your code even if the file is actually called "base.html" -- that's because Windows is a little unusual in that filenames are case-insensitive. By contrast, PythonAnywhere runs on Linux, which has case-sensitive filenames, so if the file is called "base.html" then you'd need to use that casing in your code.

If that's not the issue, perhaps we could take a look at your files and advise? We can see them from our admin interface, but we never look without asking for permission first.