Re: Integrating migrations with the check framework

2020-12-23 Thread Tom Forbes
Thanks for all the input here! I didn’t know about django-migration-linter, and it does seem quite interesting. It works by looking at the complete set of SQL statements that would be run, and running regular expressions/string comparisons on it ( https://github.com/3YOURMIND/django-migration-lin

Re: Integrating migrations with the check framework

2020-12-23 Thread Ryan Hiebert
This is an interesting discussion that is separate from, but related to, django-safemigrate, which we use to separate which migrations may run before or after deployment. I intend follow along with this discussion, to see if there are reasonable ways to identify when these zero-downtime operations

Re: Integrating migrations with the check framework

2020-12-23 Thread Paveł Tyślacki
Want to share lib I work previously for migration safety with postgres some time ago: https://github.com/tbicr/django-pg-zero-downtime-migrations there are also checker and replacement of unsafe mirations with safe replacement. ср, 23 дек. 2020 г. в 12:18, Adam Johnson : > Hi Tom, > > I love this

Re: Configurable landing page in admin site

2020-12-23 Thread Adam Johnson
You can do this already by changing where the login redirects to in your custom AdminSite class def login(self, *args, **kwargs): response = super().login(*args, **kwargs) if isinstance(response, HttpResponseRedirect): response = HttpResponseRedirect("/custom-page/")

Configurable landing page in admin site

2020-12-23 Thread Gagan Deep
Greetings of the day, I have use case where I want to show a custom landing page after a user logs into the admin site. One way to do it will be to override the index_template attribute of AdminSite

Re: Integrating migrations with the check framework

2020-12-23 Thread Adam Johnson
Hi Tom, I love this idea and would like to help developers write safe migrations too. You didn't mention this pre-existing project: https://github.com/3YOURMIND/django-migration-linter . It might be worth checking how that works. I'm not sure what any public API could look like here. In django-l