email = models.EmailField (_ ('email address'), unique = True) first_name = models.CharField (_ ('first name'), max_length = 30) last_name = models.CharField (_ ('last name'), max_length = 150)
If these models are defined in the Django standard, or if you use Vscode's Django extension, you'll see ~ Field (_ (''), ...) as a completion of your input.
However, if you execute it in that state, NameError will occur.
Even if you look it upinitIt wasn't because I forgot to make .py.
What is the solution?
- Make Vscode ignore the error (No)
- Quietly ban the notation
I only know that.
Answer # 1
It's a quick glance, and it's pretty speculative, but I think it's multilingual processing with gettext.
Assuming there is speculation, for the time being
NameErrorIf you want to avoid
import gettext #Initialize with language setting disabled tr = gettext.NullTranslations () tr.install ()
I think you can avoid it if you do it once at the beginning of the runtime.
However, I don't know if it's some kind of App or django, but it may be better to support the language properly.
For the time being, please search for "gettext" as a keyword.
- python - django 1452 integrity error
- python - i want to change the ip address that the django app gets by default from remote_addr to http_x_forwarded_for in middlew
- python - error when scraping with selenium and firefox
- python - categorical_crossentoropy error does not resolve
- python - vscode: i can't debug django apps
- about error handling during implementation of user registration function in django
- readcsv error in python
- python - django i want to filter the data associated with a foreign key and display it in a template
- python - i want to display an image with pysimplegui, but an error occurs
- [python] graphviz output format error
- python - error in image binarization using cv2adaptivethreshold function
- python - i want to use asyncio with django custom commands
- python - i get an error when connecting to a voice channel with discordpy
- python 3x - best estimator: i get an error with no syntax, so please tell me what to do
- python - django image folder reasons to create static and madia folders separately
- django - dajngo heroku server error (500) cannot be resolved
- [python] i don't know how to solve the error
- python - an error has occurred in yolo v3
- python - idle cannot resolve the "rootgeometry" error
- python : Django Render does not open HTML Page
- How to use the same model object in different templates. Python. Django.
- Ready sources of small projects and programs on Python
- python : How to display objects associated via ForeignKey in Django pattern?
- python : Models and forms in Django
- python : How to make username from other fields?
- python : PycharmPro Installation Error
- python : Download Django Server File
- python : Model with quantity in Django ORM
- python : Django Forms auto-generated field