diff options
author | Andy Doan <andy.doan@linaro.org> | 2014-08-25 13:00:06 -0500 |
---|---|---|
committer | Andy Doan <andy.doan@linaro.org> | 2014-08-25 13:00:06 -0500 |
commit | d70e5e52b98766c4df6b931f37686819956d7baa (patch) | |
tree | 8592dc2ce90dfe16d6030d55e0ea96053e719329 | |
parent | e0fb55d96bdb1ae8bb397941da09b687e8cbc5bb (diff) |
API: refactor "uploads" into more common "api" module
This just moves the current uploads.py module into a more
commonly named "api/v1.py". This is just setting the stage
to better arrange code and support a v2 api if needed.
Change-Id: Id1991cb1e5a49bb5a77a992bbcd9c001225ada81
-rw-r--r-- | license_protected_downloads/api/__init__.py | 0 | ||||
-rw-r--r-- | license_protected_downloads/api/v1.py (renamed from license_protected_downloads/uploads.py) | 0 | ||||
-rw-r--r-- | license_protected_downloads/views.py | 3 | ||||
-rw-r--r-- | urls.py | 4 |
4 files changed, 4 insertions, 3 deletions
diff --git a/license_protected_downloads/api/__init__.py b/license_protected_downloads/api/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/license_protected_downloads/api/__init__.py diff --git a/license_protected_downloads/uploads.py b/license_protected_downloads/api/v1.py index 5cc6fa1..5cc6fa1 100644 --- a/license_protected_downloads/uploads.py +++ b/license_protected_downloads/api/v1.py diff --git a/license_protected_downloads/views.py b/license_protected_downloads/views.py index abdd4ab..99f0017 100644 --- a/license_protected_downloads/views.py +++ b/license_protected_downloads/views.py @@ -28,12 +28,13 @@ from models import License, APIKeyStore import importlib group_auth_modules = [importlib.import_module(m) for m in settings.GROUP_AUTH_MODULES] from BeautifulSoup import BeautifulSoup -from uploads import file_server_post import config from common import safe_path_join from group_auth_common import GroupAuthError import xml.dom.minidom as dom +from license_protected_downloads.api.v1 import file_server_post + LINARO_INCLUDE_FILE_RE = re.compile( r'<linaro:include file="(?P<file_name>.*)"[ ]*/>') @@ -53,10 +53,10 @@ urlpatterns = patterns('', 'license_protected_downloads.views.get_license_api'), url(r'^api/request_key$', - 'license_protected_downloads.uploads.api_request_key'), + 'license_protected_downloads.api.v1.api_request_key'), url(r'^api/delete_key$', - 'license_protected_downloads.uploads.api_delete_key'), + 'license_protected_downloads.api.v1.api_delete_key'), # Catch-all. We always return a file (or try to) if it exists. # This handler does that. |