* Jim Illback [190512 14:22]:
> Tim, this won’t help you to use or solve the formfield_overrides issues, but
> maybe it will be helpful. I’ve not tried this for a CharField, but it works
> great on a TextField (which has no max_length, so model size isn’t impacted):
>
> 1. Install widget tweak
Tim, this won’t help you to use or solve the formfield_overrides issues, but
maybe it will be helpful. I’ve not tried this for a CharField, but it works
great on a TextField (which has no max_length, so model size isn’t impacted):
1. Install widget tweaks and add {% load widget_tweaks %} at the
* Joe Reitman [190512 13:34]:
> Tim,
>
> I found this in the Django source code on Github searching for
> 'formfield_overrides'. It is in a test module testing formfield_overrides
> functionality. I'm assuming you imported TextInput from forms? This should
> work to change your *admin* display
Tim,
I found this in the Django source code on Github searching for
'formfield_overrides'. It is in a test module testing formfield_overrides
functionality. I'm assuming you imported TextInput from forms? This should
work to change your *admin* display. Are trying to change your Admin panel
fo
* Joe Reitman [190512 10:31]:
> Tim,
>
> Here is an example of a custom form field limiting the input to 100
> characters. The model is defined to accept 255 chars. BTW, the text widget
> 'attrs' sets the HTML form element attributes.
>
> class SearchForm(forms.Form):
>
> search_for = forms.
Tim,
Here is an example of a custom form field limiting the input to 100
characters. The model is defined to accept 255 chars. BTW, the text widget
'attrs' sets the HTML form element attributes.
class SearchForm(forms.Form):
search_for = forms.CharField(
label='',
label_suffix='',
max_leng
* Tim Johnson [190511 11:20]:
> django 2.1.5 with python 3.7.2
>
> I have a models.py class as follows:
> class Article(models.Model):
> title = models.CharField(max_length=255,)
>
> And I want to override the rendered default size attribute to 100 in
> the input/text form field.
>
>
django 2.1.5 with python 3.7.2
I have a models.py class as follows:
class Article(models.Model):
title = models.CharField(max_length=255,)
And I want to override the rendered default size attribute to 100 in
the input/text form field.
the template rendering is done as follows
{
8 matches
Mail list logo