database specific checks in deserialization

2014-05-12 Thread Riccardo Magliocchetti

Hello,

as of 1.6.x loading fixtures with a blank=True IpAddressField field 
dumped from a db that allows empty string would fail on postgresql 
because its specialized field inet does not allow empty strings.


This issue has been reported in #6233 [1] that have been closed as 
duplicate of #5622 [2] which has been closed as wontfix because of 
https://code.djangoproject.com/ticket/5622#comment:61


So while one can fix the data with a sed one liner, still it would be 
handy to have django handle the situation gtracefully. So would be 
possibile to add database specific checks to loadata or somewhere upper 
in the chain as serializers.deserialize?


thanks in advance,
riccardo

[1] https://code.djangoproject.com/ticket/6233
[2] https://code.djangoproject.com/ticket/5622

--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5370AD52.307%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Why not Single Table Inheritance?

2014-05-12 Thread Thomas Güttler

Single Table Inheritance is used by ruby-on-rails and SQLAlchemy.

Are there reasons why it is used in django?

I would love to see a polymorphic inheritance solution in django.

I know that there are third party apps which provide this, but
something like this should be in the core.

There was some discussion about this [1]. One reason against it was,
that supporting not-null is not available. But a db constraint which
checks the type and data column could solve this.

What do you think?

  Thomas Güttler

[1] 
https://code.djangoproject.com/wiki/ModelInheritance#a1.ModelingparentrelationsinSQL

--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/537093E5.1070002%40tbz-pariv.de.
For more options, visit https://groups.google.com/d/optout.