piston site on django admin page

73 views
Skip to first unread message

Wayne

unread,
Apr 5, 2010, 3:53:14 PM4/5/10
to django-piston
Hi,

Please discard my previous incomplete message.

I am very new to Django and Piston. I am using piston to generate json
api. After installing Piston package into Python site packages, I only
refer the Piston library in two places.
api/
handler.py ( from piston.handler import BaseHandler )

urls.py ( from piston.resource import Resource )

However when l logged in to the django admin page, I saw site
administration list for piston:
Piston
Consumers Add Change
Nonces Add Change
Resources Add Change
Tokens Add Change

I am wondering if there is any way to customize this list? Actually I
prefer removing them for now but don't know where to start.

Thanks for your help.

Wayne

Tim Graham

unread,
Apr 8, 2010, 10:07:53 AM4/8/10
to django-piston
You can remove these items from the admin page using the following
snippet:

from django.contrib import admin
from piston.models import Nonce, Consumer, Token

admin.site.unregister(Consumer)
admin.site.unregister(Nonce)
admin.site.unregister(Token)

Message has been deleted

Wayne

unread,
Apr 8, 2010, 11:26:17 AM4/8/10
to django-piston
Many thanks, Tim. It solves the problem.
Reply all
Reply to author
Forward
0 new messages