[Solved]-Mod_wsgi: Unable to stat Python home and ImportError: No module named 'encodings'

6👍 ✅ A couple of things to check. The pyenv tool doesn’t install Python with a shared library by default. That could result in problems as mod_wsgi wants a shared library. You need to explicitly tell pyenv to build Python with a shared library. A home directory on many Linux systems is not readable to … Read more

[Solved]-How to do bulk instance deletion in Django Rest Framework?

3👍 Forgot to add the router urls to the urlpatterns. I must be blind. urlpatterns += [ url(r’^API/’, include(bulk_delete_router.urls, namespace=’api’)), ] 👤Escher Why is Django a 'less secure' app according to Google? 3👍 Adding an additional ‘delete’: ‘destroy’ to the ‘List route’ route will perfectly do the job. class CustomRouter(DefaultRouter): “”” a custom URL router … Read more

[Solved]-How can I specify a relative path in a Python logging config file?

7👍 ✅ Mark is right, your path in the config file is relative to whatever directory is current when the logging.config.fileConfig call is made. This depends on the details of your deployment method. You may need to specify an absolute path to your file, by prefixing ‘test.log’ with a directory you know to be writable … Read more

[Solved]-Is there a way to filter a django queryset based on string similarity (a la python difflib)?

2👍 ✅ soundex won’t help you, because it’s a phonetic algorithm. Joe and Joseph aren’t similar phonetically, so soundex won’t mark them as similar. You can try Levenshtein distance, which is implemented in PostgreSQL. Maybe in your database too and if not, you should be able to write a stored procedure, which will calculate the … Read more

[Solved]-Django's I18N with third-party apps

5👍 You can create gettext messages in django-tagging directory and contribute translations to project leader: django-admin.py makemessages -l de If you want to create message catalog in your project directory, you should install or symlink app (check -S option of makemessages) in your project directory. Then use manage.py makemessages command as above. If you want … Read more

[Solved]-Is there a Java user management package similar to Django auth application?

5👍 ✅ The Emmet project may be of interest to you. Emmet includes a custom SpringSecurity UserDetailsStore and a webapp for user account management. Out of the box functionality includes basic user account details, roles, support for multiple identities, support password aging, self registration and password reset. You can use it in conjunction with SpringSecurity … Read more

[Solved]-Where is the ON DELETE CASCADE logic being implemented in Django? (PostgreSQL is used)

8👍 ✅ If you are asking where the relevant code is implemented: You can find it here. Implementing the CASCADE-DELETE logic in the application/ORM layer makes sense as this enables the app to get informed when deletion happens (eg. Django’s delete signals are fired for the deleted instances), furthermore it is a sane way to … Read more