Re: ForeignKey Fields null=True does not imply blank=True

2015-08-26 Thread khoobks
It just occurred to me where I went wrong. I have a line that makes the form field non-required which means the form won't flag the validation error. Thanks Florian On Wednesday, 26 August 2015 20:18:48 UTC+8, khoobks wrote: > > That makes sense however I would have expected the M

Re: ForeignKey Fields null=True does not imply blank=True

2015-08-26 Thread khoobks
, Florian Schweikert wrote: > > On 26/08/15 11:59, khoobks wrote: > > I just discovered some interesting behaviour in Django 1.8.4 and was > > wondering if this was an unexpected side effect or specifically designed > > behaviour. > > That behaviour is intended and docu

ForeignKey Fields null=True does not imply blank=True

2015-08-26 Thread khoobks
Hi All, I just discovered some interesting behaviour in Django 1.8.4 and was wondering if this was an unexpected side effect or specifically designed behaviour. class UserProfile(models.Model): # Notice that I do not say that blank=True my_other_model = models.ForeignKey('my_app.OtherM

Django Transactions at the Model Level

2010-02-10 Thread khoobks
Hi Everyone, I was wondering if a Django guru was able to verify if my mental model of how django transactions operate is correct. The situation that I have is that I'd like to place the transaction.commit_on_success decorator around a custom function on my model. At the same time, I would also l