This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import posixpath | |
from filebrowser.storage import StorageMixin | |
from storages.backends.s3boto3 import S3Boto3Storage | |
class S3Storage(StorageMixin, S3Boto3Storage): | |
"""Integration between filebrowser and S3 storage.""" | |
def isdir(self, name): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ⚠️ USE AT YOUR OWN RISK | |
# first: pip install pysqlite3-binary | |
# then in settings.py: | |
# these three lines swap the stdlib sqlite3 lib with the pysqlite3 package | |
__import__('pysqlite3') | |
import sys | |
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3') | |
DATABASES = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import struct | |
import datetime | |
import binascii | |
from urllib.parse import quote_plus | |
# pip install pycryptodomex | |
from Cryptodome import Random | |
from Cryptodome.Cipher import AES |