On 21/03/2014 11:13am, Russell Keith-Magee wrote:
>
> On Thu, Mar 20, 2014 at 6:50 PM, Venkatraman S <
venk...@gmail.com
> <mailto:
venk...@gmail.com>> wrote:
>
>
> On Sat, Mar 15, 2014 at 7:11 AM, Russell Keith-Magee
> <
rus...@keith-magee.com <mailto:
rus...@keith-magee.com>> wrote:
>
>
> On Sat, Mar 15, 2014 at 7:19 AM, Jonathan Baker
> <
jonathand...@gmail.com
> <mailto:
jonathand...@gmail.com>> wrote:
>
> Does that mean that the default="" functionality is
> implemented by the ORM, instead of in the database layer?
>
> This is correct - Django's "default" argument is an API level
> default, not a database level default.
>
>
> @Russ, any specific reasons for this choice?
>
>
> Honestly - not a clue. It was like that when I got here, so the reasons
> are probably lost in the depths of time. :-)
If some things are done in the database and some in the ORM, developer
madness ensues.
I think keeping everything in the ORM is entirely manageable for
programmers. Tweaking the database is last straw optimisation.
Mike
>
> Trying to reverse engineer the decision, the most likely reason is that
> Django has allowed callable defaults; if you define a callable in your
> Django model as a default, there's no way to pass this down to the
> database (or, at least, not an easy way).
>
> Yours,
> Russ Magee %-)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
django-users...@googlegroups.com
> <mailto:
django-users...@googlegroups.com>.
> <mailto:
django...@googlegroups.com>.
>
https://groups.google.com/d/msgid/django-users/CAJxq848nGKNY%2B4tpfPK80sOT1gwPocvR%2BPbrs6jeQiUcOv1mew%40mail.gmail.com
> <
https://groups.google.com/d/msgid/django-users/CAJxq848nGKNY%2B4tpfPK80sOT1gwPocvR%2BPbrs6jeQiUcOv1mew%40mail.gmail.com?utm_medium=email&utm_source=footer>.