1 year ago

#354589

test-img

shafquet Naghmi

TemplateSyntaxError at /blogapp/author/1/ Could not parse the remainder: '==user.username' from 'request.user==user.username'

what can we use inside {% %} ? Template error: In template C:\Users\SHAFQUET NAGHMI\blog\blogapp\templates\blogapp\authorview.html, error at line 7 Could not parse the remainder: '==user.username' from 'request.user==user.username'

1 : {% include 'blogapp/home.html' %}
   2 : {% load static %}
   3 : {% block content %}
   4 : <link rel="stylesheet" href="{% static 'blogapp/authorview.css' %}">
   5 : <!-- Latest compiled and minified CSS -->
   6 : <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
   7 :  {% if request.user==user.username %} 
   8 : {{user.username}}
   9 : {% endif %}
   10 : <h1>{{user.username}}</h1>
   11 : <!-- <h1>{{request.user}}</h1>-->
   12 : {% for post in a %}
   13 : <div >
   14 :     <div class="container">
   15 :       <h2 class="display-1">{{post.title}} </h2>
   16 :       <p class="display-2">{{post.summary}}</p><br>
   17 :       <p class="display-2">{{post.Newpost}}</p>

django

django-views

django-templates

django-4.0

0 Answers

Your Answer

Accepted video resources