Commits

Anonymous committed 8d3cd06

Fix for issue 117 on jespern's bitbucket - added an admin.py file and moved the registration of piston's models with the admin app into it

Comments (0)

Files changed (1)

 from django.db.models.signals import post_save, post_delete
 from django.db import models
 from django.contrib.auth.models import User
-from django.contrib import admin
 from django.core.mail import send_mail, mail_admins
 
 # Piston imports
     def __unicode__(self):
         return u"Nonce %s for %s" % (self.key, self.consumer_key)
 
-admin.site.register(Nonce)
 
 class Consumer(models.Model):
     name = models.CharField(max_length=255)
         self.secret = secret
         self.save()
 
-admin.site.register(Consumer)
 
 class Token(models.Model):
     REQUEST = 1
             self.callback = callback
             self.callback_confirmed = True
             self.save()
-        
-admin.site.register(Token)
+
 
 # Attach our signals
 post_save.connect(consumer_post_save, sender=Consumer)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.