sync settings, etc
This commit is contained in:
parent
a333c4b01e
commit
8a668eca1f
2 changed files with 10 additions and 4 deletions
|
@ -11,8 +11,7 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
|
|||
"""
|
||||
|
||||
import os
|
||||
import requests
|
||||
import psycopg2.extensions
|
||||
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
@ -299,7 +298,6 @@ GOOGLE_API_KEY = '***REMOVED***'
|
|||
# IGDB
|
||||
IGDB_CLIENT_ID = 'deadbeef'
|
||||
IGDB_CLIENT_SECRET = 'deadbeef'
|
||||
IGDB_ACCESS_TOKEN = requests.post(f'https://id.twitch.tv/oauth2/token?client_id={IGDB_CLIENT_ID}&client_secret={IGDB_CLIENT_SECRET}&grant_type=client_credentials').json()['access_token']
|
||||
|
||||
# Thumbnail setting
|
||||
# It is possible to optimize the image size even more: https://easy-thumbnails.readthedocs.io/en/latest/ref/optimize/
|
||||
|
@ -361,3 +359,10 @@ TYPESENSE_CONNECTION = {
|
|||
}],
|
||||
'connection_timeout_seconds': 2
|
||||
}
|
||||
|
||||
DOWNLOADER_RETRIES = 3
|
||||
DOWNLOADER_SAVEDIR = None
|
||||
ENABLE_NEW_MODEL = os.getenv('new_data_model')
|
||||
if ENABLE_NEW_MODEL:
|
||||
INSTALLED_APPS.append('polymorphic')
|
||||
INSTALLED_APPS.append('catalog.apps.CatalogConfig')
|
||||
|
|
|
@ -17,6 +17,7 @@ class Command(BaseCommand):
|
|||
self.stdout.write(self.style.ERROR(f'Unknown site for {url}'))
|
||||
return
|
||||
self.stdout.write(f'Fetching from {site}')
|
||||
resource = site.get_resource_ready(auto_link=False, auto_save=False)
|
||||
resource = site.scrape()
|
||||
self.stdout.write(self.style.SUCCESS(f'Done.'))
|
||||
pprint.pp(resource.metadata)
|
||||
pprint.pp(resource.lookup_ids)
|
||||
|
|
Loading…
Add table
Reference in a new issue