python - Implementing workflows in Django Admin - Django -


I have a good admin panel setup so that users can manage the data within the site.

There is a problem

As the question The model is just one, I am trying to integrate a boolean 'accepted_for_blurbing' field and the 'Totmaney Fields' star of a lot of'

interrupts within this Admin panel.

If there is some opinion on a topic that would be really amazing =)

A few times ago I did the same functionality. Here's what you have to do: Create an acceptance status model, and there are different forms of approval, that is, each model object shows different acceptance steps. Apart from this, you must have a Statisticsist model that indicates that the current situation is according to your article (for example).

class articles (model. Model) title = model.heldfield (max_language = 32) body = model. Textfield () class acceptance status (model.model): name = model.carfield (max_lamp = 32) alias = model.carfield (maximum_language = 32, pk = true) status status history (models.model): position = model . Freigkey (suspension of approval) Article = Model. Forward (paragraph) current = model Boolean field (default = true)

So when you change the state of the article in your admin, a new StatusHistory object is created and the old object is given the current = false variable. This approach looks a bit heavy, but when you apply it, you need to easily fall into an ORM: The history of the situation is a list of all the objects, the changes in the workflow will only create the status of new approvals and have a stiff status The flow flow is included in the change. >


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -