Hi there,
I'm not sure if decorators are the best way to do this, but I've removed the idea of using context processors and I'm not sure if a middleware is what I'd like.
My situation is as follows: We process sales and other data daily. Every month, we close the month off just like any other business. We do this on paper, but I would like to apply the same thing to our system. So basically, make data read-only if it falls within the closed off date.
I've easily figured out how to do this on the processing/backend side, but how would I pass such a context to a template without editing a ton of my view functions? I simply want to pass a decorator to my functions that will test the date of the instance that's being passed and add some context to the template so I can display a little message, letting the user know why the "Save" button is blanked out.
I hope my question makes sense. Thanks in advance.