afsarker / wdd-w2-custom-admin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom admin for a blogging platform

The platform is really simple. There are just blogs, authors and entries. An Entry is created by an Author and exists inside a blog. The models are already created for you. Let's start describing the changes to the admin you'll have to do.

Scoring

Each Entry has a "scoring". You have to build a custom action to reset that score for a set of selected entries:

image

After this action is applied, the score of all the entries should be 0.

Moving an entry to a different blog

You need to write other custom action to move an entry to a different blog. This action should have an intermediate step that will let the user select the blog

Step 1 select the entry to move image

Step 2 select the blog to move the entry to image

Custom login page

Our blogging platform will support login with Github. So we want to make that option available to our users. You'll need to change the Admin login page to include a "Login with Github" link:

image

Important You DON'T need to actually implement the Github login. Just find a way to put the link in the admin login page.

Custom select2 input in the admin

The Entry add/change view should include select2 instead of regular inputs.

image

Hint: This might be useful ;) If you include any dependency, remember to add it to the requirements and tox files

Custom admin view (and URL)

You'll need to write a custom view to display some stats about the blogging platform. To do that, the easiest way is to create a custom view for the admin. In order to do that, the get_urls method from the ModelAdmin might be handy.

image

Extra points

There's one really cool libray called djangosuit that completely changes the look and feel of the django admin. If you wanna get some extra points in this assignment, try to integrate http://djangosuit.com/ to this project.

About

License:MIT License


Languages

Language:Python 94.0%Language:Shell 6.0%