Hello!
I'm new to Django and Javascript and so I need some help with passing list
from django template to Javascript.
The list is available in template (template.html) by using
{% for shbf in should_have_found_list %}
but I have no idea how to access this list from Javascript.
The should_have_found_list is created in context.py file like:
should_have_found_list = ShouldHaveFound.objects.filter(enabled=1)
and passed to template in view.py as a part of dictionary:
return render_to_response(template_name, RequestContext(request, {
>
> 'form': form,
>
> 'fields': simplejson.dumps(form.field_mapping),
>
> }))
>
>
I would appreciate some guidance :)
Thank You,
Drakko
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/91594aa1-d770-43d8-82b9-e638669a8204%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.