def as_geojson(request): set = Flaws.objects.all() return render_to_geojson(set,mimetype='application/json')
def flaws_by_tag(request,tag_id): query_tag = Tag.objects.get(id=tag_id) entries = TaggedItem.objects.get_by_model(Flaws, query_tag.name) #entries = entries.order_by('-date') return render_to_geojson(entries,mimetype='text/plain')
def flaws_by_severity(request,severity): set = Flaws.objects.filter(severity__gte=int(severity)) return render_to_geojson(set,mimetype='text/plain')
def all_flaws(request): set = Flaws.objects.all() return render_to_geojson(set,included_fields=['id','_tags_cache','tags','severity','name','description'],mimetype='text/plain')