L
L
Leonid2019-11-03 17:37:30
Django
Leonid, 2019-11-03 17:37:30

Where to upload a domain verification file in Django?

Hello! Tell me - where to upload the file for confirming the rights to the domain, which are issued by Google and Yandex in Django?
I uploaded it to the templates folder where the root base.html is located, but when I try to access it through the browser, it says that the file was not found, which is generally logical. It is necessary that the file be given at the root - mysite.ru/googlefe2g0076f1a6c218.html

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-11-03
@stilet69

Add a view pattern to urls.py

urlpatterns = [
    path('google12345a6b78fcde90.html', TemplateView.as_view(template_name='google12345a6b78fcde90.html')),
]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question