Beispiel #1
0
def as_geojson(request):
    set = Flaws.objects.all()
    return render_to_geojson(set,mimetype='application/json')
Beispiel #2
0
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')
Beispiel #3
0
def flaws_by_severity(request,severity):
    set = Flaws.objects.filter(severity__gte=int(severity))
    return render_to_geojson(set,mimetype='text/plain')
Beispiel #4
0
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')