Closed hmaurer closed 10 years ago
It could simply be abstracted into a separate function, that is then called by the views. Alternatively, a more elegant solution could involve one view inheriting from the other, i wrote code to do that somewhere... Django will likely provide a solution to a problem such as this, it must be common enough.
Is there a concept of before_filter (rails) in django? Would be better than duplicating code at https://github.com/compsoc-edinburgh/website-django/commit/6a4bd5cea2f15aade6d6206a0c56df011e7ef3f5