Tokens and tags are being displayed as text

I create a forms page, used the csrf, form as_p, and I have a if/else, but all of it are displayed as text. Other pages have tokens and tags, but are being printed properly.

Please post your view and your template here.

When posting code, templates, or error messages here, please enclose the code (etc) between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted.

HTML for the forms:

<div class="row">
    <div class="col s12">
        <button type="button" class="btn waves-effect waves-light tool-pattern-btn btn-action-pattern"
            onclick="javascript:history.go(-1)"><i class="material-icons left">keyboard_return</i>Go Back</button>

    <div class="col s12">
        {% if submitted %}
        Employee included succefully!
        {% else %}
        <form action="{% url 'incluir' %}" method="post">
            <div class="card hoverable">
                <div class="card-content exib-pattern">
                    <span class="card-title-home"><i class="material-icons left">add</i>New Employee</span>
                    {% csrf_token %}
                    <div class="row">
                        <div class="input-field col s12 l6">
                            <input ng-model="" maxlength="255" type="text" class="form-control" id="nome"
                                name="nome" />
                            <label for="nome">Name:</label>
                        <div class="input-field col s12 l4">
                            <input ng-model="" maxlength="255" type="text" class="form-control" id="nome"
                                name="nome" />
                            <label for="nome">Email address:</label>
                    <div class="row">
                        <div class="input-field col s12 l3">
                            <input ng-model="pessoa.identidade" maxlength="255" type="text" class="form-control" id="identidade"
                                name="identidade" />
                            <label for="id">Identidade:</label>
                        <div class="input-field col s12 l3">
                            <label for="id">Institute:</label>
                            <input ng-model="" maxlength="255" type="text" class="form-control"
                                id="instituto" name="instituto">
                    {{ form.as_p }}
                    <div class="row">
                        <div class="col s12">
                            <button type="submit" class="btn waves-effect waves-light tool-pattern-btn green">
                                <i class="material-icons left">add</i>Add</button>
        {% endif %}




def incluirPessoa(request):
    submitted = False
    if request.method == "POST":
        form = incluirForm(request.POST)
        if form.is_valid():
            return HttpResponseRedirect('incluir?submitted=True')
        form = incluirForm()
        if 'submitted' in request.GET:
            submitted = True

    return render(request, 'pages/pessoas/incluir.html', {'form':form, 'submitted':submitted})

The html file shown above, is that the file named pages/pessoas/incluir.html?

Is that the complete file? If not, please post the complete file.

Also please post your file that contains the reference to this view.

The html it’s complete.

the url:
there a views file called tipoC, pessoas, planoT, etc.

from .views import  home, pessoas

path('incluirPessoa', pessoas.incluirPessoa, name='incluirPessoa'),

I’m not seeing anything obviously wrong here.

Are you using some type of JavaScript front end to call this view and inject the results into your page? (I don’t think that would be related to this, I’m just trying to understand what’s going on.)

Can you please post a screen image of the page you’re seeing?

The print

And about javascript, the project is integrated with java script. I’m sorry, it’s my first time working as fullstack and, with django, so I need to do some action on java script also?

I don’t know. I’m still gathering information to try to understand what’s going wrong here.

What url the JavaScript is issuing to retrieve this page?

Can you show the JavaScript that is doing this?

Okay, so to redirect to this page I had to put a path in java script route:

$routeProvider.when("/incluirPessoa/form", {templateUrl: "static/pages/pessoas/incluir.html", controller: "PessoasController"});

Ok, I think I see what the issue might be.

Unfortunately, I don’t know what JavaScript framework you’re using - and even if I knew which one, I probably still wouldn’t fully understand what this line is doing.

However, it does appear to me like your script is directly attempting to load the template as html instead of calling the view to have the template rendered.

Your JavaScript would need to issue a request to the incluirPerssoa URL to have it render and return the template.

Thanks, help me a lot. I will try to implemente it.