Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import unicode_literals
- from django.db import models
- from django.conf import settings
- from allauth.account.signals import user_logged_in, user_signed_up
- class Profile(models.Model):
- user = models.OneToOneField(settings.AUTH_USER_MODEL, null = True, blank = True)
- name = models.CharField(max_length=120)
- descriptions = models.TextField(default= 'My description', null = True, blank = True)
- def __unicode__(self):
- return self.name
- class UserStripe(models.Model):
- user = models.OneToOneField(settings.AUTH_USER_MODEL)
- stripe_id = models.CharField(max_length = 200, null =True, blank = True)
- def __unicode__(self):
- return str(self.stripe_id)
- def my_callback(sender, request, user, **kwargs):
- print "Request finished!"
- print kwargs
- user_logged_in.connect(my_callback)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement