J
J
Juvel19882022-02-23 20:34:33
Django
Juvel1988, 2022-02-23 20:34:33

How to give a link to a regular html page in django without a template?

Question: usually (I used to do this) a link in Django is formed on a template like I now need to link to a static html page. It also looks standard, but django does not see such links and does not find anything on them. What could be wrong here? Specifically, I need to give a link in the header menu to the page about the company. Variants tried both with direct, and with the relative link. Both get 404 errors.<a href ={% url "имя шаблона"%}>ссылка</а>.
<a href="адрес ссылки">ссылка</a>

<a href="/templates/prosvet/about_us.html">О нас</a>
            <a href="/about_us.html">О нас</a>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2022-02-23
@Juvel1988

via TemplateView https://docs.djangoproject.com/en/4.0/ref/class-ba... well, or via a simple function with render

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question