2
respostas

Erro com {% load static %}

Olá. Apos inserir o código {% load static %} no arquivo HTML, o server parou de subir.

Gerando diversos erros.

Sem esse código volta a funcionar, mas as imagens e css não carregam na página.

Como consigo resolver isso?

Estou com python 3.9 e todos os pactotes da venv atualizados.

2 respostas

Assim o server carrega...

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->

    <!-- Título -->
    <title>Alura Receitas</title>

    <!-- Favicon -->
    <link rel="icon" href="% static 'img/core-img/favicon.ico' %">

    <!-- Stylesheet -->
    <link rel="stylesheet" href="% static 'site.css' %">
O post foi fechado por inatividade após 6 meses.

Para continuar o assunto, recomendamos criar um novo tópico.

Bons Estudos!

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software