Hide a specific `ModelForm` field in a Django 5 Admin Inline while still passing initial values as a dict — combine `formfield_overrides` with `get_initial`.
I updated Django to version 5.0 and also updated other libraries. When I executed the code for sending an email, an ssl.SSLCertVerificationError occurred.
When looking at the assertEqual method in Django's unit tests, the first argument is named 'first' and the second argument is named 'second'. It appears that there is no difference in the usage of these variables.
pipenv install throws "AttributeError: module 'pkgutil' has no attribute 'ImpImporter'" on Python 3.12. Run `python3 -m ensurepip --upgrade` in both the global and virtualenv, or rebuild the pipenv environment.
Fix `symbol not found in flat namespace '_mysql_affected_rows'` when importing MySQLdb in Python — rebuild mysqlclient against the right MySQL client library.
Here's an overview in English:
How to change the user of an already established session using the Django shell.
Please do not attempt this in a production environment as it can be dangerous.
During an IT audit, it was necessary to represent the scale of the application. To achieve this, I decided to consider the total number of URLs in Django as an indicator of the application's scale.
Return a common post-login redirect target in Django Allauth without specifying a SocialAccount — how `LOGIN_REDIRECT_URL` behaves and how to override it.
Here is the solution for resolving the ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' that occurs when running manage.py hoge in Django.
If a Django MySQL connection still hits 'No DB engine substitution' despite setting `ENGINE` to `django.db.backends.mysql`, here is the root cause and fix.