This file contains hidden or 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
| // The following data should be run in the console while viewing the page https://read.amazon.com/ | |
| // It will export a CSV file called "download" which can (and should) be renamed with a .csv extension | |
| // var db = openDatabase('K4W', '3', 'thedatabase', 1024 * 1024); | |
| var db = openDatabase('K4W', '5', 'thedatabase', 1024 * 1024); | |
| getAmazonCsv = function() { | |
| // Set header for CSV export line - change this if you change the fields used | |
| var csvData = "ASIN,Title,Authors,PurchaseDate\n"; |
This file contains hidden or 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
| class DisableMigrations(object): | |
| def __contains__(self, item): | |
| return True | |
| def __getitem__(self, item): | |
| return "notmigrations" | |
| MIGRATION_MODULES = DisableMigrations() |
This file contains hidden or 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
| # If your test settings file doesn't import any other settings file | |
| # then you can use the function directly: | |
| def prevent_tests_migrate(db): | |
| import django | |
| from django.db import connections | |
| from django.db.migrations.executor import MigrationExecutor | |
| django.setup() | |
| ma = MigrationExecutor(connections[db]).loader.migrated_apps | |
| return dict(zip(ma, ['{a}.notmigrations'.format(a=a) for a in ma])) |