Revision aa197ee4 api/versions.py

b/api/versions.py
48 48
def versions_list(request):
49 49
    # Normal Response Codes: 200, 203
50 50
    # Error Response Codes: 400, 413, 500, 503
51
    
51

  
52 52
    if request.serialization == 'xml':
53 53
        data = render_to_string('versions_list.xml', {'versions': VERSIONS})
54 54
    elif request.serialization == 'atom':
......
56 56
        data = render_to_string('versions_list.atom', {'now': now,'versions': VERSIONS})
57 57
    else:
58 58
        data = json.dumps({'versions': {'values': VERSIONS}})
59
        
59

  
60 60
    return HttpResponse(data)
61 61

  
62 62
@api_method('GET', atom_allowed=True)
......
71 71
    # We hardcode to v1.1 since it is the only one we support
72 72
    version = VERSION_1_1.copy()
73 73
    version['links'] = version['links'] + DESCRIBED_BY
74
    
74

  
75 75
    if request.serialization == 'xml':
76 76
        version['media_types'] = MEDIA_TYPES
77 77
        data = render_to_string('version_details.xml', {'version': version})

Also available in: Unified diff