launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06602
[Merge] lp:~rvb/maas/maas-cleanup-maas-project into lp:maas
Raphaël Badin has proposed merging lp:~rvb/maas/maas-cleanup-maas-project into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~rvb/maas/maas-cleanup-maas-project/+merge/96151
This branch:
- changes wsgi.py in such a way that the directory where wsgi.py is located will be added to the path. This way, we will have the 'maas' project on the path without hardcoding its location.
- moves api_auth back into maasserver because maas won't be on the path outside of the web application.
--
https://code.launchpad.net/~rvb/maas/maas-cleanup-maas-project/+merge/96151
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/maas-cleanup-maas-project into lp:maas.
=== modified file 'contrib/wsgi.py'
--- contrib/wsgi.py 2012-03-05 16:58:40 +0000
+++ contrib/wsgi.py 2012-03-06 15:27:20 +0000
@@ -1,7 +1,7 @@
# Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-"""WSGI Application"""
+"""WSGI Application."""
from __future__ import (
print_function,
@@ -17,7 +17,8 @@
import django.core.handlers.wsgi
-sys.path.append('/usr/share/maas/')
+current_path = os.path.dirname(os.path.abspath(__file__))
+sys.path.append(current_path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'maas.settings'
application = django.core.handlers.wsgi.WSGIHandler()
=== renamed file 'src/maas/api_auth.py' => 'src/maasserver/api_auth.py'
=== modified file 'src/maasserver/tests/test_views.py'
--- src/maasserver/tests/test_views.py 2012-03-05 11:28:41 +0000
+++ src/maasserver/tests/test_views.py 2012-03-06 15:27:20 +0000
@@ -20,8 +20,8 @@
from maasserver.models import (
Config,
NODE_AFTER_COMMISSIONING_ACTION,
+ SSHKeys,
UserProfile,
- SSHKeys,
)
from maasserver.testing import (
factory,
@@ -52,7 +52,7 @@
doc.cssselect('h2')])
def test_500(self):
- from maas.urls import urlpatterns
+ from maasserver.urls import urlpatterns
urlpatterns += patterns('',
(r'^500/$', 'django.views.defaults.server_error'),)
response = self.client.get('/500/')
=== modified file 'src/maasserver/urls_api.py'
--- src/maasserver/urls_api.py 2012-03-05 15:29:55 +0000
+++ src/maasserver/urls_api.py 2012-03-06 15:27:20 +0000
@@ -15,7 +15,6 @@
patterns,
url,
)
-from maas.api_auth import api_auth
from maasserver.api import (
AccountHandler,
AdminRestrictedResource,
@@ -28,6 +27,7 @@
NodesHandler,
RestrictedResource,
)
+from maasserver.api_auth import api_auth
account_handler = RestrictedResource(AccountHandler, authentication=api_auth)
=== modified file 'src/metadataserver/urls.py'
--- src/metadataserver/urls.py 2012-02-22 12:51:50 +0000
+++ src/metadataserver/urls.py 2012-03-06 15:27:20 +0000
@@ -17,7 +17,7 @@
patterns,
url,
)
-from maas.api_auth import api_auth
+from maasserver.api_auth import api_auth
from metadataserver.api import (
IndexHandler,
MetaDataHandler,