dejmail / begrepptjanst

Begreppstjänst för VGR Informatik
0 stars 0 forks source link

Send email to person submitting a begrepp when the status changes #13

Closed dejmail closed 4 years ago

dejmail commented 4 years ago

In order to try take some of the work out of dealing with all the begrepp/term that will be coming in, it would be good to be able to automatically email the person who has sent in a begrepp when the status changes to "Klar" or similar, and that way the "backend" staff won't have to worry about sending this sort of notification out manually (or not sending it at all).

We will probably have to use signals and Model overrides on the Admin side. I have no experience on this, so it will be a challenge.

dejmail commented 4 years ago

On second thoughs, signal is maybe not what we want. Seems a simple method override is sufficient.

https://lincolnloop.com/blog/django-anti-patterns-signals/

dejmail commented 4 years ago

Coded a simple admin function in the dropdown list that sends the current status of the ordered term. Nothing more. Currently the absolute URL to the term only loads a portion of the HTML, i.e. only the "extends" portion loads, which means that it then doesn't work. I think we'll have to recode how we handle clicking on the individual terms.