0001-add-HttpRequest.get_version-to-help-in-API-versionni.patch
wcs/qommon/http_request.py | ||
---|---|---|
144 | 144 | |
145 | 145 |
def is_in_backoffice(self): |
146 | 146 |
return self.get_path().startswith('/backoffice/') |
147 | ||
148 |
def get_api_version(self): |
|
149 |
'''Helper for API versionning''' |
|
150 |
try: |
|
151 |
return int(self.form.get('api_version', 0)) |
|
152 |
except ValueError: |
|
153 |
return 0 |
|
147 |
- |