[Django] #28040: AttributeError: 'SplitArrayWidget' object has no attribute 'template_name'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Django] #28040: AttributeError: 'SplitArrayWidget' object has no attribute 'template_name'

Django
#28040: AttributeError: 'SplitArrayWidget' object has no attribute 'template_name'
------------------------------------------+------------------------
               Reporter:  Dariusz Paluch  |          Owner:  nobody
                   Type:  Bug             |         Status:  new
              Component:  Forms           |        Version:  1.11
               Severity:  Normal          |       Keywords:
           Triage Stage:  Unreviewed      |      Has patch:  0
    Needs documentation:  0               |    Needs tests:  0
Patch needs improvement:  0               |  Easy pickings:  0
                  UI/UX:  0               |
------------------------------------------+------------------------
 AttributeError: 'SplitArrayWidget' object has no attribute 'template_name'

--
Ticket URL: <https://code.djangoproject.com/ticket/28040>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/049.fc8f28f487c602d5ab08182afc8cc656%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28040: SplitArrayWidget isn't updated for template-based widget rendering (was: AttributeError: 'SplitArrayWidget' object has no attribute 'template_name')

Django
#28040: SplitArrayWidget isn't updated for template-based widget rendering
----------------------------------+------------------------------------
     Reporter:  Dariusz Paluch    |                    Owner:  nobody
         Type:  Bug               |                   Status:  new
    Component:  contrib.postgres  |                  Version:  1.11
     Severity:  Release blocker   |               Resolution:
     Keywords:                    |             Triage Stage:  Accepted
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------
Changes (by Tim Graham):

 * severity:  Normal => Release blocker
 * component:  Forms => contrib.postgres
 * stage:  Unreviewed => Accepted


Old description:

> AttributeError: 'SplitArrayWidget' object has no attribute
> 'template_name'

New description:

 Error: `AttributeError: 'SplitArrayWidget' object has no attribute
 'template_name'`.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/28040#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.c8c4aacd335cd24f35e7f2366e6394a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28040: SplitArrayWidget isn't updated for template-based widget rendering

Django
In reply to this post by Django
#28040: SplitArrayWidget isn't updated for template-based widget rendering
----------------------------------+------------------------------------
     Reporter:  Dariusz Paluch    |                    Owner:  nobody
         Type:  Bug               |                   Status:  new
    Component:  contrib.postgres  |                  Version:  1.11
     Severity:  Release blocker   |               Resolution:
     Keywords:                    |             Triage Stage:  Accepted
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------

Comment (by Claude Paroz):

 Could you provide a more extensive traceback to see where the error
 occurs?

--
Ticket URL: <https://code.djangoproject.com/ticket/28040#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.885ca66039f6b0eb296c91d40f61f1ee%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28040: SplitArrayWidget isn't updated for template-based widget rendering

Django
In reply to this post by Django
#28040: SplitArrayWidget isn't updated for template-based widget rendering
----------------------------------+------------------------------------
     Reporter:  Dariusz Paluch    |                    Owner:  nobody
         Type:  Bug               |                   Status:  new
    Component:  contrib.postgres  |                  Version:  1.11
     Severity:  Release blocker   |               Resolution:
     Keywords:                    |             Triage Stage:  Accepted
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------

Old description:

> Error: `AttributeError: 'SplitArrayWidget' object has no attribute
> 'template_name'`.

New description:

 Error: `AttributeError: 'SplitArrayWidget' object has no attribute
 'template_name'`.


 Traceback:


 {{{

 Template error:
 In template
 /home/vagrant/apps/pg/python/templates/shared/partials/structure.html,
 error at line 0
    'SplitArrayWidget' object has no attribute 'template_name'   1 : {%
 load static_files %}
    2 : {% spaceless %}
    3 : <!DOCTYPE html>
    4 : <html lang="pl" itemscope itemtype="http://schema.org/Organization"
 {% block html_attrs %}{% endblock html_attrs %} {% block tracking_scripts
 %}data-pg="google-tag-manager" data-config-google-tag-
 manager="googleTagManager"{% endblock tracking_scripts %}>
    5 :     <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
    6 :         <meta charset="utf-8">
    7 :         <meta http-equiv="X-UA-Compatible" content="IE=edge">
    8 :         {% block head %}
    9 :
    10 :             {% block meta %}


 Traceback:

 File "/usr/local/lib/python3.4/dist-
 packages/django/core/handlers/exception.py" in inner
   41.             response = get_response(request)

 File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py"
 in _get_response
   217.                 response = self.process_exception_by_middleware(e,
 request)

 File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py"
 in _get_response
   215.                 response = response.render()

 File "/usr/local/lib/python3.4/dist-packages/django/template/response.py"
 in render
   107.             self.content = self.rendered_content

 File "/usr/local/lib/python3.4/dist-packages/django/template/response.py"
 in rendered_content
   84.         content = template.render(context, self._request)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/backends/django.py" in render
   66.             return self.template.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   207.                     return self._render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 _render
   199.         return self.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/loader_tags.py" in render
   177.             return compiled_parent._render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 _render
   199.         return self.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/loader_tags.py" in render
   177.             return compiled_parent._render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 _render
   199.         return self.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/loader_tags.py" in render
   177.             return compiled_parent._render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 _render
   199.         return self.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/defaulttags.py" in render
   411.         return
 strip_spaces_between_tags(self.nodelist.render(context).strip())

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/loader_tags.py" in render
   72.                 result = block.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/loader_tags.py" in render
   72.                 result = block.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/library.py"
 in render
   225.         _dict = self.func(*resolved_args, **resolved_kwargs)

 File
 "/home/vagrant/apps/pg/python/apps/shared/forms/templatetags/forms.py" in
 render_field
   85.     if not field:

 File "/usr/local/lib/python3.4/dist-packages/django/forms/boundfield.py"
 in __len__
   64.         return len(self.subwidgets)

 File "/usr/local/lib/python3.4/dist-packages/django/utils/functional.py"
 in __get__
   35.         res = instance.__dict__[self.name] = self.func(instance)

 File "/usr/local/lib/python3.4/dist-packages/django/forms/boundfield.py"
 in subwidgets
   57.             for widget in
 self.field.widget.subwidgets(self.html_name, self.value(), attrs=attrs)

 File "/usr/local/lib/python3.4/dist-packages/django/forms/boundfield.py"
 in <genexpr>
   56.             BoundWidget(self.field.widget, widget,
 self.form.renderer)

 File "/usr/local/lib/python3.4/dist-packages/django/forms/widgets.py" in
 subwidgets
   191.         context = self.get_context(name, value, attrs)

 File "/usr/local/lib/python3.4/dist-packages/django/forms/widgets.py" in
 get_context
   212.             'template_name': self.template_name,

 Exception Type: AttributeError at /xxxx/
 Exception Value: 'SplitArrayWidget' object has no attribute
 'template_name'

 }}}

 I'm temporary fix this in my app by subclass django Widget and add
 template_name property

 {{{
 from django.contrib.postgres import forms as postgres_forms


 class SplitArrayWidget(postgres_forms.SplitArrayWidget):
     template_name = ''
 {{{

--

Comment (by dpaluch-rp):

 I add traceback to description, and way I fix this

--
Ticket URL: <https://code.djangoproject.com/ticket/28040#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.d2e910c9f26fb951fe4fda230496b0eb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28040: SplitArrayWidget isn't updated for template-based widget rendering

Django
In reply to this post by Django
#28040: SplitArrayWidget isn't updated for template-based widget rendering
----------------------------------+------------------------------------
     Reporter:  Dariusz Paluch    |                    Owner:  nobody
         Type:  Bug               |                   Status:  new
    Component:  contrib.postgres  |                  Version:  1.11
     Severity:  Release blocker   |               Resolution:
     Keywords:                    |             Triage Stage:  Accepted
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------
Description changed by dpaluch-rp:

Old description:

> Error: `AttributeError: 'SplitArrayWidget' object has no attribute
> 'template_name'`.
>

> Traceback:
>

> {{{
>
> Template error:
> In template
> /home/vagrant/apps/pg/python/templates/shared/partials/structure.html,
> error at line 0
>    'SplitArrayWidget' object has no attribute 'template_name'   1 : {%
> load static_files %}
>    2 : {% spaceless %}
>    3 : <!DOCTYPE html>
>    4 : <html lang="pl" itemscope
> itemtype="http://schema.org/Organization" {% block html_attrs %}{%
> endblock html_attrs %} {% block tracking_scripts %}data-pg="google-tag-
> manager" data-config-google-tag-manager="googleTagManager"{% endblock
> tracking_scripts %}>
>    5 :     <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
>    6 :         <meta charset="utf-8">
>    7 :         <meta http-equiv="X-UA-Compatible" content="IE=edge">
>    8 :         {% block head %}
>    9 :
>    10 :             {% block meta %}
>

> Traceback:
>
> File "/usr/local/lib/python3.4/dist-
> packages/django/core/handlers/exception.py" in inner
>   41.             response = get_response(request)
>
> File "/usr/local/lib/python3.4/dist-
> packages/django/core/handlers/base.py" in _get_response
>   217.                 response = self.process_exception_by_middleware(e,
> request)
>
> File "/usr/local/lib/python3.4/dist-
> packages/django/core/handlers/base.py" in _get_response
>   215.                 response = response.render()
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/response.py"
> in render
>   107.             self.content = self.rendered_content
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/response.py"
> in rendered_content
>   84.         content = template.render(context, self._request)
>
> File "/usr/local/lib/python3.4/dist-
> packages/django/template/backends/django.py" in render
>   66.             return self.template.render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render
>   207.                     return self._render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> _render
>   199.         return self.nodelist.render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render
>   990.                 bit = node.render_annotated(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render_annotated
>   957.             return self.render(context)
>
> File "/usr/local/lib/python3.4/dist-
> packages/django/template/loader_tags.py" in render
>   177.             return compiled_parent._render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> _render
>   199.         return self.nodelist.render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render
>   990.                 bit = node.render_annotated(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render_annotated
>   957.             return self.render(context)
>
> File "/usr/local/lib/python3.4/dist-
> packages/django/template/loader_tags.py" in render
>   177.             return compiled_parent._render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> _render
>   199.         return self.nodelist.render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render
>   990.                 bit = node.render_annotated(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render_annotated
>   957.             return self.render(context)
>
> File "/usr/local/lib/python3.4/dist-
> packages/django/template/loader_tags.py" in render
>   177.             return compiled_parent._render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> _render
>   199.         return self.nodelist.render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render
>   990.                 bit = node.render_annotated(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render_annotated
>   957.             return self.render(context)
>
> File "/usr/local/lib/python3.4/dist-
> packages/django/template/defaulttags.py" in render
>   411.         return
> strip_spaces_between_tags(self.nodelist.render(context).strip())
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render
>   990.                 bit = node.render_annotated(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render_annotated
>   957.             return self.render(context)
>
> File "/usr/local/lib/python3.4/dist-
> packages/django/template/loader_tags.py" in render
>   72.                 result = block.nodelist.render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render
>   990.                 bit = node.render_annotated(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render_annotated
>   957.             return self.render(context)
>
> File "/usr/local/lib/python3.4/dist-
> packages/django/template/loader_tags.py" in render
>   72.                 result = block.nodelist.render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render
>   990.                 bit = node.render_annotated(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
> render_annotated
>   957.             return self.render(context)
>
> File "/usr/local/lib/python3.4/dist-packages/django/template/library.py"
> in render
>   225.         _dict = self.func(*resolved_args, **resolved_kwargs)
>
> File
> "/home/vagrant/apps/pg/python/apps/shared/forms/templatetags/forms.py" in
> render_field
>   85.     if not field:
>
> File "/usr/local/lib/python3.4/dist-packages/django/forms/boundfield.py"
> in __len__
>   64.         return len(self.subwidgets)
>
> File "/usr/local/lib/python3.4/dist-packages/django/utils/functional.py"
> in __get__
>   35.         res = instance.__dict__[self.name] = self.func(instance)
>
> File "/usr/local/lib/python3.4/dist-packages/django/forms/boundfield.py"
> in subwidgets
>   57.             for widget in
> self.field.widget.subwidgets(self.html_name, self.value(), attrs=attrs)
>
> File "/usr/local/lib/python3.4/dist-packages/django/forms/boundfield.py"
> in <genexpr>
>   56.             BoundWidget(self.field.widget, widget,
> self.form.renderer)
>
> File "/usr/local/lib/python3.4/dist-packages/django/forms/widgets.py" in
> subwidgets
>   191.         context = self.get_context(name, value, attrs)
>
> File "/usr/local/lib/python3.4/dist-packages/django/forms/widgets.py" in
> get_context
>   212.             'template_name': self.template_name,
>
> Exception Type: AttributeError at /xxxx/
> Exception Value: 'SplitArrayWidget' object has no attribute
> 'template_name'
>
> }}}
>
> I'm temporary fix this in my app by subclass django Widget and add
> template_name property
>
> {{{
> from django.contrib.postgres import forms as postgres_forms
>

> class SplitArrayWidget(postgres_forms.SplitArrayWidget):
>     template_name = ''
> {{{

New description:

 Error: `AttributeError: 'SplitArrayWidget' object has no attribute
 'template_name'`.


 Traceback:


 {{{

 Template error:
 In template
 /home/vagrant/apps/pg/python/templates/shared/partials/structure.html,
 error at line 0
    'SplitArrayWidget' object has no attribute 'template_name'   1 : {%
 load static_files %}
    2 : {% spaceless %}
    3 : <!DOCTYPE html>
    4 : <html lang="pl" itemscope itemtype="http://schema.org/Organization"
 {% block html_attrs %}{% endblock html_attrs %} {% block tracking_scripts
 %}data-pg="google-tag-manager" data-config-google-tag-
 manager="googleTagManager"{% endblock tracking_scripts %}>
    5 :     <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
    6 :         <meta charset="utf-8">
    7 :         <meta http-equiv="X-UA-Compatible" content="IE=edge">
    8 :         {% block head %}
    9 :
    10 :             {% block meta %}


 Traceback:

 File "/usr/local/lib/python3.4/dist-
 packages/django/core/handlers/exception.py" in inner
   41.             response = get_response(request)

 File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py"
 in _get_response
   217.                 response = self.process_exception_by_middleware(e,
 request)

 File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py"
 in _get_response
   215.                 response = response.render()

 File "/usr/local/lib/python3.4/dist-packages/django/template/response.py"
 in render
   107.             self.content = self.rendered_content

 File "/usr/local/lib/python3.4/dist-packages/django/template/response.py"
 in rendered_content
   84.         content = template.render(context, self._request)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/backends/django.py" in render
   66.             return self.template.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   207.                     return self._render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 _render
   199.         return self.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/loader_tags.py" in render
   177.             return compiled_parent._render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 _render
   199.         return self.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/loader_tags.py" in render
   177.             return compiled_parent._render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 _render
   199.         return self.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/loader_tags.py" in render
   177.             return compiled_parent._render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 _render
   199.         return self.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/defaulttags.py" in render
   411.         return
 strip_spaces_between_tags(self.nodelist.render(context).strip())

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/loader_tags.py" in render
   72.                 result = block.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-
 packages/django/template/loader_tags.py" in render
   72.                 result = block.nodelist.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render
   990.                 bit = node.render_annotated(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/base.py" in
 render_annotated
   957.             return self.render(context)

 File "/usr/local/lib/python3.4/dist-packages/django/template/library.py"
 in render
   225.         _dict = self.func(*resolved_args, **resolved_kwargs)

 File
 "/home/vagrant/apps/pg/python/apps/shared/forms/templatetags/forms.py" in
 render_field
   85.     if not field:

 File "/usr/local/lib/python3.4/dist-packages/django/forms/boundfield.py"
 in __len__
   64.         return len(self.subwidgets)

 File "/usr/local/lib/python3.4/dist-packages/django/utils/functional.py"
 in __get__
   35.         res = instance.__dict__[self.name] = self.func(instance)

 File "/usr/local/lib/python3.4/dist-packages/django/forms/boundfield.py"
 in subwidgets
   57.             for widget in
 self.field.widget.subwidgets(self.html_name, self.value(), attrs=attrs)

 File "/usr/local/lib/python3.4/dist-packages/django/forms/boundfield.py"
 in <genexpr>
   56.             BoundWidget(self.field.widget, widget,
 self.form.renderer)

 File "/usr/local/lib/python3.4/dist-packages/django/forms/widgets.py" in
 subwidgets
   191.         context = self.get_context(name, value, attrs)

 File "/usr/local/lib/python3.4/dist-packages/django/forms/widgets.py" in
 get_context
   212.             'template_name': self.template_name,

 Exception Type: AttributeError at /xxxx/
 Exception Value: 'SplitArrayWidget' object has no attribute
 'template_name'

 }}}

 I'm temporary fix this in my app by subclass django Widget and add
 template_name property

 {{{
 from django.contrib.postgres import forms as postgres_forms


 class SplitArrayWidget(postgres_forms.SplitArrayWidget):
     template_name = ''
 }}}

--

--
Ticket URL: <https://code.djangoproject.com/ticket/28040#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.5bd7c7c1586ef39f9d444b2a36436643%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28040: SplitArrayWidget isn't updated for template-based widget rendering

Django
In reply to this post by Django
#28040: SplitArrayWidget isn't updated for template-based widget rendering
----------------------------------+------------------------------------
     Reporter:  Dariusz Paluch    |                    Owner:  nobody
         Type:  Bug               |                   Status:  new
    Component:  contrib.postgres  |                  Version:  1.11
     Severity:  Release blocker   |               Resolution:
     Keywords:                    |             Triage Stage:  Accepted
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------

Comment (by Tim Graham):

 What does your form look like? I can't reproduce a  crash with a
 straightforward form like:
 {{{
 from django import forms
 from django.contrib.postgres.forms import SplitArrayField

 class Form(forms.ModelForm):
     tags = SplitArrayField(base_field=forms.CharField(max_length=200),
 size=3)
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28040#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.29795510fdcef2109f21576a29d4a4e1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28040: Update SplitArrayWidget to use template-based widget rendering (was: SplitArrayWidget isn't updated for template-based widget rendering)

Django
In reply to this post by Django
#28040: Update SplitArrayWidget to use template-based widget rendering
----------------------------------+------------------------------------
     Reporter:  Dariusz Paluch    |                    Owner:  nobody
         Type:  Bug               |                   Status:  new
    Component:  contrib.postgres  |                  Version:  1.11
     Severity:  Release blocker   |               Resolution:
     Keywords:                    |             Triage Stage:  Accepted
    Has patch:  1                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------
Changes (by Tim Graham):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/8401 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/28040#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.e23450235c0fd9d41502b6bc9f32272d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28040: Update SplitArrayWidget to use template-based widget rendering

Django
In reply to this post by Django
#28040: Update SplitArrayWidget to use template-based widget rendering
-------------------------------------+-------------------------------------
     Reporter:  Dariusz Paluch       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.postgres     |                  Version:  1.11
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

 * stage:  Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/28040#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.14273e246529084a065583c689aad508%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28040: Update SplitArrayWidget to use template-based widget rendering

Django
In reply to this post by Django
#28040: Update SplitArrayWidget to use template-based widget rendering
-------------------------------------+-------------------------------------
     Reporter:  Dariusz Paluch       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.postgres     |                  Version:  1.11
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"1ebd295082bb0e6b230cf3bc39fd04bee71c2bd7" 1ebd2950]:
 {{{
 #!CommitTicketReference repository=""
 revision="1ebd295082bb0e6b230cf3bc39fd04bee71c2bd7"
 Fixed #28040 -- Updated SplitArrayWidget to use template-based widget
 rendering.

 Thanks Preston Timmons for review.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28040#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.6d38da038bf7223882921f41cf9c3b4b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Django] #28040: Update SplitArrayWidget to use template-based widget rendering

Django
In reply to this post by Django
#28040: Update SplitArrayWidget to use template-based widget rendering
-------------------------------------+-------------------------------------
     Reporter:  Dariusz Paluch       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.postgres     |                  Version:  1.11
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

 In [changeset:"a2975cb083a01012eb0cb997f0f5b7c2263cfbba" a2975cb0]:
 {{{
 #!CommitTicketReference repository=""
 revision="a2975cb083a01012eb0cb997f0f5b7c2263cfbba"
 [1.11.x] Fixed #28040 -- Updated SplitArrayWidget to use template-based
 widget rendering.

 Thanks Preston Timmons for review.

 Backport of 1ebd295082bb0e6b230cf3bc39fd04bee71c2bd7 from master
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28040#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.d4538d1572fcc31e1a54b11f08f6f7da%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Loading...