File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2626# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2727# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2828# POSSIBILITY OF SUCH DAMAGE.
29- #
29+
3030import operator
3131from django .db import models
3232from django .core .exceptions import FieldError , ImproperlyConfigured
@@ -42,6 +42,7 @@ class JqGrid(object):
4242 model = None
4343 fields = []
4444 allow_empty = True
45+ extra_config = {}
4546
4647 pager_id = '#pager'
4748 url = None
@@ -229,6 +230,7 @@ def get_caption(self):
229230
230231 def get_config (self , as_json = True ):
231232 config = self .get_default_config ()
233+ config .update (self .extra_config )
232234 config .update ({
233235 'url' : self .get_url (),
234236 'caption' : self .get_caption (),
@@ -237,7 +239,7 @@ def get_config(self, as_json=True):
237239 if as_json :
238240 config = json_encode (config )
239241 return config
240-
242+
241243 def lookup_foreign_key_field (self , options , field_name ):
242244 '''Make a field lookup converting __ into real models fields'''
243245 if '__' in field_name :
You can’t perform that action at this time.
0 commit comments