1. Benoit Chesneau
  2. django-authopenid

Commits

bchesneau  committed 86b3438

[svn r81] backward incompatible change. Move to newforms-admin.

  • Participants
  • Parent commits f24ac88
  • Branches trunk

Comments (0)

Files changed (2)

File django_authopenid/models.py

View file
 # -*- coding: utf-8 -*-
+from django.conf import settings
+from django.contrib import admin
+from django.contrib.auth.models import User
 from django.db import models
-from django.contrib.auth.models import User
-from django.conf import settings
 
 import md5, random, sys, os, time
 
     def __unicode__(self):
         return "Openid %s with user %s" % (self.openid_url, self.user)
         
-    class Admin:
-        """ default admin class """
-
+class UserAssociationAdmin(admin.ModelAdmin):
+    """User association admin class"""
+admin.site.register(UserAssociation, UserAssociationAdmin)
 
 class UserPasswordQueueManager(models.Manager):
     """ manager for UserPasswordQueue object """

File djauthaupenid_example/urls.py

View file
 from django.conf.urls.defaults import *
+from django.contrib import admin
 
+admin.autodiscover()
 
 urlpatterns = patterns('',
     (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'home.html'}),
     (r'^account/', include('django_authopenid.urls')),
-    #(r'^admin/', include('django.contrib.admin.urls')),
+    (r'^admin/(.*)', admin.site.root),
 )