Re: Django 1.5 AbstractBaseUser with char primary key not JSON serializable

2013-02-18 Thread Kaloian
Hi Russel, Great to see this documented. I will most probably go with the "api_key *in addition* to the integer primary key" solution to avoid additional problems. Thanks, Kaloian On Saturday, February 16, 2013 4:25:41 AM UTC+2, Russell Keith-Magee wrote: > > Hi Kaloian, > > Ah - you've just fi

Re: Django 1.5 AbstractBaseUser with char primary key not JSON serializable

2013-02-15 Thread Russell Keith-Magee
Hi Kaloian, Ah - you've just fired a neuron in my brain… This is a known issue, and it's not just the permission_required decorator. See ticket #14881. I don't remember the permission_required decorator itself being a problem at that time (not saying it isn't -- just that it wasn't reported as s

Re: Django 1.5 AbstractBaseUser with char primary key not JSON serializable

2013-02-15 Thread Kaloian
Hi Russel I got into another small issue related to the character primary key of the user model. When I try to use the permission_required decorator on that model I got the following error. Exception Value: invalid literal for int() with base 10: '3DDz0Vi7zonFDq9JfByKkeparghaWwupVwbMCbL7JH

Re: Django 1.5 AbstractBaseUser with char primary key not JSON serializable

2013-02-13 Thread Russell Keith-Magee
On Wed, Feb 13, 2013 at 9:51 PM, Kaloian wrote: > > Hi Russell, > > > Thanks for the responce! I actually found the problem it was not where I > was looking for it and it was more of a typo. > And your suggestion No.2 appears to be right: > > * Do you have any models with foreign keys to your cus

Re: Django 1.5 AbstractBaseUser with char primary key not JSON serializable

2013-02-13 Thread Kaloian
Hi Russell, Thanks for the responce! I actually found the problem it was not where I was looking for it and it was more of a typo. And your suggestion No.2 appears to be right: > * Do you have any models with foreign keys to your custom user? (i.e., is > the problem manifesting when serialis

Re: Django 1.5 AbstractBaseUser with char primary key not JSON serializable

2013-02-12 Thread Russell Keith-Magee
On Tue, Feb 12, 2013 at 9:03 PM, Kaloian wrote: > I am having the following custom user model trying to use the Django 1.5 > AbstractBaseUser: > > class Merchant(AbstractBaseUser): > email = models.EmailField() > company_name = models.CharField(max_length=256) > website = models.URLFi

Django 1.5 AbstractBaseUser with char primary key not JSON serializable

2013-02-12 Thread Kaloian
I am having the following custom user model trying to use the Django 1.5 AbstractBaseUser: class Merchant(AbstractBaseUser): email = models.EmailField() company_name = models.CharField(max_length=256) website = models.URLField() description = models.TextField(blank=True) ap