Commits

Jesper Nøhr committed 8a5882d Merge
  • Participants
  • Parent commits adeef48, 8d3cd06

Comments (0)

Files changed (2)

File piston/emitters.py

                         maybe = getattr(data, maybe_field, None)
                         if maybe:
                             if callable(maybe):
-                                if len(inspect.getargspec(maybe)[0]) == 1:
+                                if len(inspect.getargspec(maybe)[0]) <= 1:
                                     ret[maybe_field] = _any(maybe())
                             else:
                                 ret[maybe_field] = _any(maybe)

File piston/models.py

 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)