views:

41

answers:

2

I'm creating a Django powered website that will have numerous applications (Blog, Shop, Portfolio, etc.) that will be edited by 5 or so people, and I have so-far been designing everything with the Django admin in mind.

I have come to realise that this is a very bad way of thinking -as really- the Django admin should really only be for top level administrators, and should be used for exactly that: administrating the website, not contributing to it.

I wrote out the feature-set and realised that the number of applications the entire website should have (sitemaps,mailers,contactforms,comments,tags etc.)is much much larger than the number of features the editor should have access to (CRUD actions for blog/about section etc).

Is it better practice to build a complex permission based Django admin, or build a second custom "editors" admin to run concurrently.

I think this is something that should be discussed in the documentation, as until I realised this, I had a lot of trouble understanding how to break the website down into applications, as I was designing everything with the admin in mind (and what actual user should see in the admin)

A: 

It is a matter of opinion I think. But personally I prefer to create a separate admin and link a user group to that instead of using the main admin for both.

That way you can easily see how everything looks for the other users when there's a problem. It all depends on your situation though, so YMMV

WoLpH
+3  A: 

I'd argue that you should build a separate "diverse" admin app. Here are the pros and cons as I see them:

Pros:

  1. No need to tamper with Admin or use hacks to get specific features. I suspect you'll need several such given your requirements.

  2. De coupling from Admin. While Admin is very useful it is a bad idea to tightly couple your app with it. All the more so if you are tweaking it. Your would have to watch out for any changes in Admin that would break your app.

  3. Custom styling. I guess visual appeal may not be high on your list but it is far more easier to style your apps than the Admin app.

  4. Separate the really super users from "line admins". Let only the power users see the real innards of your system.

Cons:

  1. You'd be reinventing the wheel. Generic views make this easier but you'd still end up duplicating features or featurelets.

  2. Testing. The Admin app is widely used and is fairly well tested. You can use it without writing any unit tests (for most part). If you build your own you'll have to build an extensive test suite around it.

Manoj Govindan
Yea. In terms of design and best practices, it really seems like the solution. To me, the Django admin is for the backend configuration. In my case, the end users are the editors, and they should be editing content through a different interface to the administrator. I wouldn't really consider it reinventing the wheel though, as I'd be using the admin interface anyway, this is an add one
pastylegs