aboutsummaryrefslogtreecommitdiff
path: root/app/urls.py
diff options
context:
space:
mode:
authorMilo Casagrande <milo@ubuntu.com>2014-03-24 18:09:30 +0100
committerMilo Casagrande <milo@ubuntu.com>2014-03-24 18:09:30 +0100
commit0bc5c530b2bae8da9ab3bf26f4f14e8dc5047983 (patch)
treead3c1c236491ba0e84d957cf7b3998cfc05a6381 /app/urls.py
parent9f70c9ac744f50177c325ca75ab73283c7f600ba (diff)
Add external file to handle URLs.
* Add external file where URLs are defined. * Add regex to handle search by id.
Diffstat (limited to 'app/urls.py')
-rw-r--r--app/urls.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/urls.py b/app/urls.py
index e69de29..112bb07 100644
--- a/app/urls.py
+++ b/app/urls.py
@@ -0,0 +1,25 @@
+# Copyright (C) 2014 Linaro Ltd.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+from handlers import (
+ DefConfHandler,
+ JobHandler,
+)
+
+app_urls = [
+ (r'/api/defconfig(?P<sl>/)?(?P<id>.*)', DefConfHandler),
+ (r'/api/job(?P<sl>/)?(?P<id>.*)', JobHandler),
+]