code: def tag_lookup(request):
      
      tag = request.GET['tag']
      tagSlug = slugify(tag.strip())
      tagCandidates = Tag.objects.values('word').filter(slug__startswith=tagSlug)
      tags = json.dumps([candidate['word'] for candidate in tagCandidates])
      return HttpResponse(tags, content_type='application/json')
docs: JSON endpoint that returns a list of potential tags.
  
      Used for upload template autocomplete.