1. Jesper Nøhr
  2. django-piston
Issue #60 open

Confliict with django_authopenid app

Anonymous created an issue

An error "The model Nonce is already registered" is displayed due to conflict with django_authopenid application (both django_authopenid and django-piston has model named Nonce so it is impossible to do 'admin.site.register(Nonce)' in the piston/models.py

Comments (4)

  1. Anonymous

    Well, I have got same error (The model <> is already registered) to all models in models.py: Token, Consumer, Resource...

  2. Anonymous

    Hi,

    The solution to this is to add a file called "admin.py" to the piston directory. In there, it should read:

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

    admin.site.register(Nonce) admin.site.register(Resource) admin.site.register(Consumer) admin.site.register(Token)

    You should then remove the lines that also make these statements from the models.py file.

  3. Log in to comment