Quantcast
Channel: Django Shows Page Source Instead Of My Webpage - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Django Shows Page Source Instead Of My Webpage

$
0
0

I have found that when passing context and a title into my views it causes the page to only show its html source code instead of the actual frontend graphics. If i remove the title being passed in then it works again but i do want to have the title passed in so is there any way to have this work?

Views

def myPosts(request):    context = {'products': Post.objects.all()    }    return render(request, 'create/my_posts.html', context, {'title_page': 'My Posts'})class PostListView(ListView):    model = Post    template_name = 'my_posts.html'    context_object_name = 'products'

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>