warren How to use django to render a html in serv00? I try to code like "return render(request, os.path.join(BASE_DIR,'login.html'))", but it did'nt work.
admin warren First, follow the Django installation guide: https://docs.serv00.com/Django/ After installing look into Django docs: https://docs.djangoproject.com/en/5.1/topics/http/shortcuts/#example If you got any errors - share them here and we can help.
warren runoneall I have put my html files in public directory, and "render(request, "login.html")" in views.py still can't work, it seems like file can't be found.
warren Why I change the filename from "login.html" to "index.html", my html can be visited but not through django?