Re: Trigger an event after running collapse.js

2020-12-04 Thread Adam Johnson
Rather than requiring changes to Django, I believe you can do this with a MutationObserver to detect the class attribute changing on the corresponding elements: https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/observe . This has the advantage that we don't need to add custom

Re: Support for No-SQL database in Django

2020-12-04 Thread Jacob Rief
Hello Vineet, you can perfectly use MongoDB together with Django. In fact I do that in one of my projects and where I use it, it perfectly makes sense. The question you raised is, if the Django community can adopt the ORM for non-relational databases, such as MongoDB. I would say no, for the

Re: Improving MSSQL and Azure SQL support on Django

2020-12-04 Thread Warren Chu
@Florian, @Adam - Thanks for the feedback. Focusing on MSSQL as a 3rd party backend sounds good, indeed even as the long-term goal. We have no directive at this point that inclusion into Django core is mandatory, so I think we're aligned in terms of practical goals. I'm sure we'll have new

Re: Improving MSSQL and Azure SQL support on Django

2020-12-04 Thread Adam Johnson
> > Please keep in mind that Phase 2 is something that might never happen. We > have a tendency to not bloat Django and there is no reason why a database > backend cannot live outside of core. > I agree here with Florian. It's not *impossible* to consider merging the backend, but I think we'd

Re: Quick Filter in the Admin Sidebar

2020-12-04 Thread Maxim Milovanov
Hey guys, I'm not sure that the nav_sidebar.html is the best place for the JS snippet. Probably, it should be placed in the main JS. When DOM is ready it can be initialized there. About UX. Agree the the "Clear" feature would be useful. It can be an "x" icon, or a shortkey (ESC?), or both.

Re: Quick Filter in the Admin Sidebar

2020-12-04 Thread Adam Johnson
> > I'm not sure that the nav_sidebar.html is the best place for the JS > snippet. Probably, it should be placed in the main JS. When DOM is ready it > can be initialized there. Indeed, we can't use inline JS in the admin since that doesn't work with a strict CSP. On Fri, 4 Dec 2020 at 08:42,

Re: Quick Filter in the Admin Sidebar

2020-12-04 Thread Maxim Milovanov
Hey guys, I've updated my prototype. What's changed: -- moved the JS and CSS to nav_sidebar.js and nav_sidebar.css respectively -- slight changes in styling -- added ESC key support I've updated my gist https://gist.github.com/MilovanovM/84ffbbec02391c1ba1771a3a6aee5797 My changes are:

Integrated python shell in browser

2020-12-04 Thread Manav Agarwal
Hey everyone, I am Manav and I am contributing to Django for the last few months. I am developing projects using Django for the last 2 years. Currently, I was working on a Django based project and was facing a problem. Sometimes, I had to use the python manage.py shell along with the server

Re: Integrated python shell in browser

2020-12-04 Thread Adam Johnson
Hi Manav This is the kind of thing that we'd want to see in a third party package before even considering it for core django An existing implementation of a Python shell in the browser for Django exists in the runserver_plus command of django-extensions:

Trigger an event after running collapse.js

2020-12-04 Thread Fab
When the admin's collapse script has finished it would be good to get an event I can listen to: https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/collapse.js This would be useful for custom scripts that rely on the collapse class and elements being in place. It