save as some module, import then, call 'patch()' in somewhere suchs urls.py...
1 2 3 4 5 6 7 8 9 10 11 12 | def fulltext_search_sql(self, field_name):
return ("CONTAINS(%s, %%s) > 0" % field_name)
def field_cast_sql(self, db_type):
return "%s"
def patch():
"""call me, call me"""
from django.db.backends.oracle.base import DatabaseOperations
DatabaseOperations.fulltext_search_sql = fulltext_search_sql
DatabaseOperations.field_cast_sql = field_cast_sql
|
More like this
- New Snippet! by Antoliny0919 4 days, 15 hours ago
- Add Toggle Switch Widget to Django Forms by OgliariNatan 2 months, 3 weeks ago
- get_object_or_none by azwdevops 6 months, 2 weeks ago
- Mask sensitive data from logger by agusmakmun 8 months, 1 week ago
- Template tag - list punctuation for a list of items by shapiromatron 1 year, 10 months ago
Comments
Note that this breaks the "History" links in the admin app, resulting in an ORA-00932 error when you try to click on them.
#
thanks, I'll fix it.
#
Please login first before commenting.