kbussell / django-jsonfield-compat Goto Github PK
View Code? Open in Web Editor NEWCompatibility layer for django-jsonfield and Django's native JSONField
License: MIT License
Compatibility layer for django-jsonfield and Django's native JSONField
License: MIT License
I think here logging
should be used instead:
Installing jsonfield-compat makes my migrations fail with this error:
TypeError: 'NoneType' object is not subscriptable
Seems like the error in located here
https://github.com/kbussell/django-jsonfield-compat/blob/master/jsonfield_compat/convert.py#L23
Any idea how to fix this ?
Operations to perform:
Apply all migrations: actstream, admin, agency, auth, contenttypes, core, frontend, oauth2_provider, property, sessions, social_django
Running migrations:
No migrations to apply.
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 227, in handle
self.verbosity, self.interactive, connection.alias, apps=post_migrate_apps, plan=plan,
File "/usr/local/lib/python3.6/site-packages/django/core/management/sql.py", line 53, in emit_post_migrate_signal
**kwargs
File "/usr/local/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 193, in send
for receiver in self._live_receivers(sender)
File "/usr/local/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 193, in <listcomp>
for receiver in self._live_receivers(sender)
File "/usr/local/lib/python3.6/site-packages/jsonfield_compat/convert.py", line 48, in handler_convert_json_fields
convert_model_json_fields(model)
File "/usr/local/lib/python3.6/site-packages/jsonfield_compat/convert.py", line 43, in convert_model_json_fields
convert_column_to_json(model, column_name)
File "/usr/local/lib/python3.6/site-packages/jsonfield_compat/convert.py", line 23, in convert_column_to_json
current_type = cursor.fetchone()[0].upper()
TypeError: 'NoneType' object is not subscriptable
Hi. Can you describe, how to use this app in combination with django-auditlog app, please? All my JSON fields in custom models are using native Django's Postgres field type, but django-auditlog breaks its functionality. Does your library solve the issue?
Old fashion way of solving this is creating a MANIFEST.in, but there are also a few newer ways of achieving this.
I adapted some of your code to allow cross-utilisation of django-jsonfield and django.contrib.postgres.fields.JSONField in the same project: https://dev.entrouvert.org/issues/29193
Hey @kbussell do you consider this ready for production usage yet?
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.