Django Context Syntax -


i getting syntax error in context:

'meta_description':meta_description

the arrow points the colon.

here view gives me error:

 django.shortcuts import render, get_object_or_404  .models import category, menuitem        def show_category(request, category_slug):             c = get_object_or_404(category, slug=category_slug)             menuitems = c.product_set.all()             template_name="menu/category.html"             page_title = c.name             meta_keywords = c.meta_keywords             meta_description = c.meta_description             context = {             'c':c,             'menuitems':menuitems,             'page_title':page_title,             'meta_keywords':meta_keywords             'meta_description':meta_description             }             return render(request, template_name, context) 

what causing this? thanks

you forgot , after meta_keywords

        context = {             'c':c,             'menuitems':menuitems,             'page_title':page_title,             'meta_keywords':meta_keywords,             'meta_description':meta_description             } 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -