InterviewSolution
Saved Bookmarks
| 1. |
How will you create a constant in Django? |
|
Answer» In order to create a constant in DJANGO, we have to OPEN the settings.py FILE and then a VARIABLE has to be added into it, for example: MY_CONST = "MY_VALUE". In order to utilize it constantly in VIEWS you just have to import the settings "import settings in views.py" and use it- Settings.MY_CONST |
|