Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

django admin text box

from django.forms import TextInput, Textarea
from django.db import models

class YourModelAdmin(admin.ModelAdmin):
    formfield_overrides = {
        models.CharField: {'widget': TextInput(attrs={'size':'20'})},
        models.TextField: {'widget': Textarea(attrs={'rows':4, 'cols':40})},
    }
Comment

PREVIOUS NEXT
Code Example
Python :: set lable of field django 
Python :: get python ssl certificate location 
Python :: pd calculations between columns 
Python :: python mongodb docker 
Python :: python toupper 
Python :: python bug 
Python :: extract specific key values from nested dictionary 
Python :: python slicing a list 
Python :: get legend lables and handles from plot in matplotlib 
Python :: python for loop float increment 
Python :: dbscan python 
Python :: variable bound to a set python 
Python :: convert plt.show to image to show opencv 
Python :: open textfile separated by whitespaces python 
Python :: color module python 
Python :: join two strings python 
Python :: python open file check error 
Python :: insert a new row to numpy array in especific position 
Python :: search mean in python using pandas 
Python :: how to check whether input is string or not 
Python :: python subtract between list 
Python :: create table numpy 
Python :: convert string to float python 
Python :: função anonima python 
Python :: django get all model fields 
Python :: python calculator source code 
Python :: how to input a picture into opencv raspberry pi 
Python :: python print without optional argument 
Python :: Access field values of form django 
Python :: how to delete item in string python 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =