Django 1.9 AppRegistryNotReady

2015-09-28 Thread Jonas H
Hello all, I'm not sure if it's expected behaviour, so I thought I'd rather report this here: I've had issues importing multiple (well[ish]-known) 3rd party apps with Django 1.9 that import fine on Django 1.8. The error I'm getting is AppRegistryNotReady, caused by some (indirect) import to so

Re: Why is from_db_value not called on ModelClass.objects.create()?

2015-09-28 Thread Gordon
Thanks for the replies and suggestions Simon and Marten. I am definitely calling form.clean() because I am using the default admin for views in my tests. The field in the case that was tripping me up is being used as an auto-populating primary key... so the admin form was excluding it from cle

Re: Why is from_db_value not called on ModelClass.objects.create()?

2015-09-28 Thread Marten Kenbeek
I've had to explain this behaviour a few times - most recently this SO question - so I think it's worth it to explicitly document this behaviour. I agree with Simon, though - I don't think the

Re: Adding a URL tagging feature

2015-09-28 Thread Shai Berger
Assume decorators, then, more or less: def tagged(*tags): def decorate(view): @functools.wraps(view) def decorated(*args, **kw): view(*args, **kw) decorated.tags = tags return decorated return d

Re: Why is from_db_value not called on ModelClass.objects.create()?

2015-09-28 Thread charettes
Hi Gordon, That's what I would expect the cash attribute to be since it was not retrieved from the database but explicit set during initialization. To me the `from_db_value` method name makes it clear it is only called in the former case. If you want the object you created to have a certain valu

Why is from_db_value not called on ModelClass.objects.create()?

2015-09-28 Thread Gordon
I originally asked this on IRC. It was suggested to raise the question in the mailing list. I've copied the log below with irrelevant lines removed (dpastes provided after the quoted irc) Why is from_db_value not called on Cls.objects.create()? For example, > in the CashModel test, why isn't