Fix order of namespace arguments in Application.urls
@@ -12,7 +12,7 @@ class Application(object):
This is subclassed by each app to provide a customisable container for an
app's views and permissions.
"""
- #: Namespace name
+ #: Application name
name = None
login_url = None
@@ -32,7 +32,11 @@ class Application(object):
default_permissions = None
def __init__(self, app_name=None, **kwargs):
- self.app_name = app_name
+ """
+ kwargs:
+ app_name: optionally specify the instance namespace
+ """
+ self.app_name = app_name or self.name
# Set all kwargs as object attributes
for key, value in kwargs.items():
setattr(self, key, value)
@@ -126,7 +130,7 @@ class Application(object):
@property
def urls(self):
# We set the application and instance namespace here
- return self.get_urls(), self.app_name, self.name
+ return self.get_urls(), self.name, self.app_name
class DashboardApplication(Application):
