G
G
Golopolos2021-03-26 21:56:17
AJAX
Golopolos, 2021-03-26 21:56:17

How to access templates folder in django via ajax?

Good day!
Tell me, how can I access the folder with templates through ajax and call it?
For example

ajax({
  url: 'templates' + file + '.html'
})

We can’t apply like this, as it will be 404
http://localhost:8000/templates/auth.html

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2021-03-27
@Golopolos

Directly in no way, all requests are only to what is written in urls.py

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question