← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1707660] [NEW] DynamicSelectWidget.render()/SelectWidget.render() interation incompatible with Django 1.11

 

Public bug reported:

DynamicSelectWidget has a render method:
 def render(self, *args, **kwargs):

which seems to receive a renderer argument starting from Django 1.11
(see the signature of render() from
https://docs.djangoproject.com/en/1.11/ref/forms/widgets/#widget).

Then the render() method of the parent (SelectWidget) class is called,
but it does not accept renderer:

def render(self, name, value, attrs=None, renderer=None):

This produces a warning and a template rendering failure when
DynamicSelectWidget is used, like in sahara_dashboard:

  File "/home/jenkins/workspace/gate-sahara-dashboard-python27-ubuntu-xenial/.tox/py27/src/openstack/horizon/horizon/forms/fields.py", line 360, in render
    return super(DynamicSelectWidget, self).render(*args, **kwargs)
TypeError: render() got an unexpected keyword argument 'renderer'
WARNING:django.template:Exception raised while rendering {% include %} for template 'horizon/common/_workflow_step.html'. Empty string rendered instead.

** Affects: horizon
     Importance: Undecided
     Assignee: Luigi Toscano (ltoscano)
         Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1707660

Title:
  DynamicSelectWidget.render()/SelectWidget.render() interation
  incompatible with Django 1.11

Status in OpenStack Dashboard (Horizon):
  In Progress

Bug description:
  DynamicSelectWidget has a render method:
   def render(self, *args, **kwargs):

  which seems to receive a renderer argument starting from Django 1.11
  (see the signature of render() from
  https://docs.djangoproject.com/en/1.11/ref/forms/widgets/#widget).

  Then the render() method of the parent (SelectWidget) class is called,
  but it does not accept renderer:

  def render(self, name, value, attrs=None, renderer=None):

  This produces a warning and a template rendering failure when
  DynamicSelectWidget is used, like in sahara_dashboard:

    File "/home/jenkins/workspace/gate-sahara-dashboard-python27-ubuntu-xenial/.tox/py27/src/openstack/horizon/horizon/forms/fields.py", line 360, in render
      return super(DynamicSelectWidget, self).render(*args, **kwargs)
  TypeError: render() got an unexpected keyword argument 'renderer'
  WARNING:django.template:Exception raised while rendering {% include %} for template 'horizon/common/_workflow_step.html'. Empty string rendered instead.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1707660/+subscriptions


Follow ups