Skip to content

Commit

Permalink
Merge 03564fb into 689f679
Browse files Browse the repository at this point in the history
  • Loading branch information
apie committed Sep 9, 2020
2 parents 689f679 + 03564fb commit aed327e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cachalot/apps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import copyreg
from django import __version__ as django__version__, VERSION as django_version
from django.apps import AppConfig
from django.conf import settings
Expand Down Expand Up @@ -93,4 +94,7 @@ class CachalotConfig(AppConfig):
name = 'cachalot'

def ready(self):
# Cast memoryview objects to bytes to be able to pickle them.
# https://docs.python.org/3/library/copyreg.html#copyreg.pickle
copyreg.pickle(memoryview, lambda val: (memoryview, (bytes(val),)))
cachalot_settings.load()

0 comments on commit aed327e

Please sign in to comment.