views:

967

answers:

2

Hi all :)

I'm currently developing a Blog project using Post model, which will be used by multiple authors.

I want to make an admin/control-panel interface where each author of the Post can view the Post list the author created (so he won't see the Post created by the other authors), edit, and multiple-delete them.

http://stackoverflow.com/questions/498199/valid-use-case-for-django-admin said that:

the Django admin is not suited for individual user profiles, each user would be able to see, and edit, all other user profiles. This is suited more to an administrator who has to manage all the users at once.

That means a new CRUD system should be created -- outside the contrib.admin interface. So the question is, is there any existing technique/way to implement the CRUD outside the contrib.admin system? or, what do I need to study/use? how can I implement it nicely (the minimum effort)?

Thanks in advance :)

+3  A: 

You'll want to look at the Django generic create/update forms. It's not the admin, but it's fairly easy to implement.

Harper Shelby
thanks! I will experiment with that :)
Adrian Liem
+3  A: 

This is quite easy to do by tweaking the Django admin. If this is the only reason for abandoning contrib.admin then you might want to google for some recent articles on customizing the admin before you go ahead and throw the baby out with the bathwater.

I found a few likely candidates:

and in general: http://www.ibm.com/developerworks/opensource/library/os-django-admin/index.html

(note that there was an old technique that used a threads local hack. This isn't necessary anymore as there are better ways to do this. A mention of this is a sure sign the article is out of date.)

andybak
Thanks Andy!This is just what I'm looking for :) Both you and Harper has provided me excellent answers :)I will try to play with the admin queryset then.The last thing that puzzled me now is the multiple delete in the admin CRUD. But I guess that will be another story, heheh.Thanks!
Adrian Liem
Multiple delete and other batch actions are coming with Django 1.1
andybak