Automatic problem completion and _ ("") function in Django database model models.py

recently I have been using vs code to learn django . In models.py , when I type name = CharF, the following prompt will appear.

what I want to ask is

  • Why does it prompt char_field, not CharField,
  • Why is there an extra models after completion? is it bug, or is it my wrong use?
  • After
  • completion, how and why the first parameter _ ("") function in CharField is used.

Thank you.
my vscode has two plug-ins Django and Django Template

installed.

_ () is no different from writing a string directly. After debugging _ (), it is found that it will be transferred to djangotranslationinit.py file in django: ugettext_lazy = lazy (ugettext, six.text_type). It can be seen that _ () points to ugettext_lazy inside django, while lazy implements the lazy calculation of ugettext function. Specifically, you can take a look at this https://www.jb51.net/article/...

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ed514b-3526.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ed514b-3526.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?