Django-Autocomplete-light Styling Input Box

426 views
Skip to first unread message

uma...@gmail.com

unread,
Jul 10, 2018, 9:28:33 AM7/10/18
to Django users
Hi,

this is my first post, please tell me if anything is wrong with the way I wrote question.

I am actually learning Django and I'm facing a little problem.

I've install a Postgres Database on my PC and link this Database to my Django Project.

I've install django-autocomplete-light to search threw the database while i'm typing in the input box.

But now I'm not able to change the input box create by autocomplete-light. I've seen we can create ours custom html base on the receive data from the database but is there a way to just use the default Html and CSS created by the framework and change some styling attribute like width, of height ?

I've add 2 pictures of what my app is rendering, and I just want the first input box (Created by autocomplete model) to look like the second one create by my own input box and css styling sheets.

Thanks a lot

Have a great day everyone.


Django2.jpg
Django.jpg

Melvyn Sopacua

unread,
Jul 10, 2018, 2:50:15 PM7/10/18
to django...@googlegroups.com

On dinsdag 10 juli 2018 15:24:16 CEST uma...@gmail.com wrote:

 

> But now I'm not able to change the input box create by autocomplete-light.

> I've seen we can create ours custom html base on the receive data from the

> database but is there a way to just use the default Html and CSS created by

> the framework and change some styling attribute like width, of height ?

 

Yes you can:

- Override html

- Pass options to Select2

 

P.S. Excellently formulated question.

--

Melvyn Sopacua

Reply all
Reply to author
Forward
0 new messages