-
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
Compatibility with django.postgres.HStoreField #76
Comments
The most notable feature I'd like to see backported is the The implementation is intentionally simple, especially as a |
Oh, and thanks a lot for the |
👍 Thanks for reporting on the |
+1 Any updates on this? I agree with @mjtamlyn about the The only workaround that sort of works now (for running tests) is to set # Workaround for `django.db.utils.ProgrammingError: hstore type not found in the database. please install it from your 'contrib/hstore.sql' file
DATABASES["default"]["HAS_HSTORE"] = False The makes Here's the tail of the traceback: …
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "apiserver/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 351, in execute_from_command_line
utility.execute()
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 343, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/core/management/commands/test.py", line 74, in execute
super(Command, self).execute(*args, **options)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/core/management/commands/test.py", line 90, in handle
failures = test_runner.run_tests(test_labels)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/test/runner.py", line 210, in run_tests
old_config = self.setup_databases()
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/test/runner.py", line 166, in setup_databases
**kwargs
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/test/runner.py", line 370, in setup_databases
serialize=connection.settings_dict.get("TEST", {}).get("SERIALIZE", True),
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/backends/base/creation.py", line 368, in create_test_db
test_flush=not keepdb,
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 120, in call_command
return command.execute(*args, **defaults)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/core/management/commands/migrate.py", line 93, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/Users/ryan/src/github.com/ShiftMedical/backend/.venv/lib/python3.5/site-packages/django/db/migrations/executor.py", line 19, in _init_
self.loader = MigrationLoader(self.connection)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/migrations/loader.py", line 47, in _init_
self.build_graph()
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/migrations/loader.py", line 182, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/migrations/recorder.py", line 59, in applied_migrations
self.ensure_schema()
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/migrations/recorder.py", line 49, in ensure_schema
if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/backends/base/base.py", line 164, in cursor
cursor = self.make_cursor(self._cursor())
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/backends/base/base.py", line 135, in cursor
self.ensure_connection()
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/utils.py", line 97, in __exit_
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/utils/six.py", line 658, in reraise
raise value.with_traceback(tb)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/db/backends/base/base.py", line 122, in connect
connection_created.send(sender=self.__class__, connection=self)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django/dispatch/dispatcher.py", line 201, in send
response = receiver(signal=self, sender=sender, **named)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django_hstore/apps.py", line 62, in _call_
return [x(connection) for x in handlers]
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django_hstore/apps.py", line 62, in <listcomp>
return [x(connection) for x in handlers]
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/django_hstore/apps.py", line 90, in register_hstore_handler
register_hstore(connection.connection, globally=HSTORE_REGISTER_GLOBALLY)
File "/Users/ryan/src/github.com/backend/.venv/lib/python3.5/site-packages/psycopg2/extras.py", line 775, in register_hstore
"hstore type not found in the database. "
django.db.utils.ProgrammingError: hstore type not found in the database. please install it from your 'contrib/hstore.sql' file
Use --force to continue.
Aborted due to warnings. |
I'm using django 1.8 HStore field. I'd like to use that with this project (for perks like the admin widget, schema, ect). Is there anyway I can help with this task? It might be possible for me to pay someone already involved in the project to get this done. If you want to send me a private email it's david at burkesoftware dot com |
hi everybody, sorry for being very laggish but I'm very busy with other projects right now. I invite more developers to step in and contribute to this project, the best way to do this is through the mailing list: https://groups.google.com/forum/#!forum/django-hstore |
Of course, we all get busy! Thanks for open sourcing the project and letting people use hstore before 1.8! I'll take a look at the code a bit. Here's an existential question - does it make sense to add django's hstore to this project or break out features into their own addons for django? django-hstore-admin django-hstore-schema (those are what I'm most familiar with on this project) |
@bufke Will link to my fork of this project when complete. |
How about stealing some improvements from this PR?
django/django#3219
:-)
It looks like the implementation is intentionally simple so to avoid complex code to achieve certain features.
So it probably make sense to take some improvements back into django-hstore.
Then if in PostgreSQL, the binary json type will really be merged with the hstore 2.0 features as it was announced few months ago, it could make sense to implement support for this new feature (binary json with hstore lookups and indexes) directly in this package which is already widely used.
The text was updated successfully, but these errors were encountered: