-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django 1.8 support #107
Django 1.8 support #107
Conversation
3 similar comments
|
|
1 similar comment
Is this coming out in django-hstore v1.4? Any ETA? |
i'm working on it in my free time, I can't provide an ETA. |
As a side-note.. Can you please add a paypal donate button or something on your site? I totally understand that you are doing this in your free time. Just wanted to buy you a beer :) Appreciate your work! |
very kind of you @xeor, but haven't felt the need of donations yet. I might consider this in the future. |
So now that there's a HStoreField, will django-hstore wrap that to provide the extra functionality like schema? |
@aidanlister: probably in a later release, I've analyzed the amount of work to do this and it will take quite few weeks of work. A gradual implementation sounds more realistic. |
@nemesisdesign +1 The work you've done with schema and virtual fields is awesome. Since these don't come with |
Just as a note for 1.8ers, you can now enable hstore in a migration: from django.contrib.postgres.operations import HStoreExtension class Migration(migrations.Migration):
|
@bijanvakili yes help is appreciated as right now i cannot work on this, if anyone has a bit of time can just proceed on this branch, i'll give him/her write access to push to the 1.8 branch |
I'm testing the new 1.8 functionality in our staging environments now, soon to move into production which is a little scary. The only incompatibility we've noticed at the initialisation level is having HStoreExtension in your migrations doesn't help you, because register_hstore_handler (https://github.com/djangonauts/django-hstore/blob/master/django_hstore/apps.py#L42) runs first and crashes out. You'll need to set up hstore before the connection is established if you want to keep using django-hstore. @nemesisdesign I might be able to spare a developer for a few days to work on 1.8 compatibility, there does seem to be a 1.8 blocker which is that ConcreteField issue I posted. |
|
Because we're dealing with the new _meta API, removing fields is a no-no. reload_schema removes all the hstore fields and re-adds them which isn't allowed. |
Alright I think this commit fixes the above: https://github.com/ABASystems/django-hstore/commit/4f295149016e80423e100bba31fc748b49cff9ac |
|
We cannot remove fields that aren't virtual, as _meta.fields is immutable.
@aidanlister thx for https://github.com/ABASystems/django-hstore/commit/4f295149016e80423e100bba31fc748b49cff9ac regarding the connection, django's HStoreField is very similar to django-hstore, see this comment: #76 (comment) I just pushed some more commits, let's wait and see. |
|
1 similar comment
|
|
1 similar comment
Added support for Django 1.8
Now please help us testing it in the real world! |
Is there any reason you're checking fields and other_fields rather than virtual_fields? |
@aidanlister could you be more specific? |
You're iterating fields, local_fields and virtual_fields ... I think you can just iterate virtual_fields: https://github.com/djangonauts/django-hstore/blob/master/django_hstore/fields.py#L215 See https://github.com/ABASystems/django-hstore/blob/django-1.8/django_hstore/fields.py#L204 |
It's a bit more complex than that. simple virtual fields did not work in the admin by default because inconsistencies between django models and django modeladmin, so I had to pretend virtual fields are also real fields, that's why i was iterating also on other lists. |
django.contrib.gis.db.models.sql.query
HStoreGeoQuerySet
worksInterfaceError
: connection already closedtest_reload_schema
failsWork in progress..