Remove stop parameter from home_settings and site_settings views. This is something Sverre didn't mean to commit :-) Add missing params description to the models Base class docs.
Patch by: Pawel Solyga
--- a/app/soc/views/models/base.py Mon Nov 10 22:50:27 2008 +0000
+++ b/app/soc/views/models/base.py Mon Nov 10 23:18:06 2008 +0000
@@ -19,6 +19,7 @@
__authors__ = [
'"Sverre Rabbelier" <sverre@rabbelier.nl>',
+ '"Pawel Solyga" <pawel.solyga@gmail.com>',
]
@@ -55,7 +56,7 @@
' <a href="%(create)s">Create '
'a New %(entity_type)s</a> page.')
- def __init__(self, params=None, rights=None, stop=False):
+ def __init__(self, params=None, rights=None):
"""
Args:
@@ -91,6 +92,7 @@
request: the standard Django HTTP request object
page: a soc.logic.site.page.Page object which is abstraction
that combines a Django view with sidebar menu info
+ params: a dict with params for this View
kwargs: the Key Fields for the specified entity
"""
@@ -133,6 +135,7 @@
request: the standard Django HTTP request object
page: a soc.logic.site.page.Page object which is abstraction
that combines a Django view with sidebar menu info
+ params: a dict with params for this View
kwargs: not used for create()
"""
@@ -151,12 +154,13 @@
return self.edit(request, page=page, params=params, **kwargs)
def edit(self, request, page=None, params=None, **kwargs):
- """Displays the public page for the entity specified by **kwargs
+ """Displays the edit page for the entity specified by **kwargs
Args:
request: the standard Django HTTP request object
page: a soc.logic.site.page.Page object which is abstraction
that combines a Django view with sidebar menu info
+ params: a dict with params for this View
kwargs: The Key Fields for the specified entity
"""
@@ -265,6 +269,7 @@
request: the standard Django HTTP request object
page: a soc.logic.site.page.Page object which is abstraction
that combines a Django view with sidebar menu info
+ params: a dict with params for this View
"""
params = dicts.merge(params, self._params)
@@ -304,6 +309,7 @@
request: the standard Django HTTP request object
page: a soc.logic.site.page.Page object which is abstraction
that combines a Django view with sidebar menu info
+ params: a dict with params for this View
kwargs: The Key Fields for the specified entity
"""
@@ -396,6 +402,7 @@
entity: the entity that is used
context: the context to be used
form: the form that will be used
+ params: a dict with params for this View
"""
suffix = self._logic.getKeySuffix(entity)
--- a/app/soc/views/models/home_settings.py Mon Nov 10 22:50:27 2008 +0000
+++ b/app/soc/views/models/home_settings.py Mon Nov 10 23:18:06 2008 +0000
@@ -99,7 +99,7 @@
"""View methods for the Docs model
"""
- def __init__(self, original_params=None, original_rights=None, stop=False):
+ def __init__(self, original_params=None, original_rights=None):
"""Defines the fields and methods required for the base View class
to provide the user with list, public, create, edit and delete views.
@@ -145,7 +145,7 @@
params = dicts.merge(original_params, params)
rights = dicts.merge(original_rights, rights)
- base.View.__init__(self, rights=rights, params=params, stop=stop)
+ base.View.__init__(self, rights=rights, params=params)
self._logic = soc.logic.models.home_settings.logic
--- a/app/soc/views/models/site_settings.py Mon Nov 10 22:50:27 2008 +0000
+++ b/app/soc/views/models/site_settings.py Mon Nov 10 23:18:06 2008 +0000
@@ -98,7 +98,7 @@
params = dicts.merge(original_params, params)
rights = dicts.merge(original_rights, rights)
- home_settings.View.__init__(self, original_rights=rights, original_params=params, stop=True)
+ home_settings.View.__init__(self, original_rights=rights, original_params=params)
self._logic = soc.logic.models.site_settings.logic