You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Google analytics widget looks like this in admin page:
When I press on the message, this error appears:
The error is in the file "venv/lib/site-packages/django/forms/boundfield.py", in the following function:
def as_widget(self, widget=None, attrs=None, only_initial=False):
"""
Render the field by rendering the passed widget, adding any HTML
attributes passed as attrs. If a widget isn't specified, use the
field's default widget.
"""
widget = widget or self.field.widget
if self.field.localize:
widget.is_localized = True
attrs = attrs or {}
attrs = self.build_widget_attrs(attrs, widget)
if self.auto_id and 'id' not in widget.attrs:
attrs.setdefault('id', self.html_initial_id if only_initial else self.auto_id)
return widget.render(
name=self.html_initial_name if only_initial else self.html_name,
value=self.value(),
attrs=attrs,
renderer=self.form.renderer,
)
where widget can be TextInput or Textarea from this:
from django.forms.widgets import Textarea, TextInput
However in the file "venv/lib/site-packages/django/forms/widgets.py" the widget class contains this render function which contains renderer as parameter:
def render(self, name, value, attrs=None, renderer=None):
"""Render the widget as an HTML string."""
context = self.get_context(name, value, attrs)
return self._render(self.template_name, context, renderer)
Can anyone help me with this?
The text was updated successfully, but these errors were encountered:
Google analytics widget looks like this in admin page:
When I press on the message, this error appears:
The error is in the file "venv/lib/site-packages/django/forms/boundfield.py", in the following function:
where widget can be TextInput or Textarea from this:
from django.forms.widgets import Textarea, TextInput
However in the file "venv/lib/site-packages/django/forms/widgets.py" the widget class contains this render function which contains renderer as parameter:
Can anyone help me with this?
The text was updated successfully, but these errors were encountered: