Monday, August 31, 2015

Re: Moderator and publishing workflow implementation in Django

Thank you Shawn and Dheerendra.

But I have 9 to 10 apps  and each apps will have different list of moderators. One app can have many moderator who can approve the page to go LIVE. Can you suggest me some good practice to implement this feature. Example or snippet of code will really help me.

Regards,
Mayank

On Friday, August 28, 2015 at 11:29:33 PM UTC+5:30, Dheerendra Rathor wrote:
Django has auth apps (Admin) and it also has user groups, permissions. What you asking is quite simple, you can add your editor and moderator on admin site, can write custom actions to do on news articles. 

On Fri, 28 Aug 2015 at 20:53 Shawn Milochik <shawn...@gmail.com> wrote:
One easy solution:

Add an "approved_by" field, which is a ForeignKey to User. Let it be null by default. When it's approved, save the User who approved it.
Then, whenever you're doing an ORM query to grab all stories to display, just filter on approved_by being not_null.

Alternatively, you can add a DateTime field for "approved_on" and set it when it's approved, and have it null by default.

Even better would be both, so you'd know who approved it and when, but if you want to go simple you can.

You probably didn't find a pre-built packaged solution to this because it's so trivial. Anyone can implement this in minutes with basic Django knowledge.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAOzwKwH%3DUUtEpdDTR6KoBPpYgLVt12J1jmzekCqep1f9_Nh5PA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/09828777-a601-4780-b71e-1de65c5fff38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment