diff --git a/.gitignore b/.gitignore index c36338fb..7d53fd2f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,6 @@ *.db *.db-journal -# Fedireads +# BookWyrm .env /images/ diff --git a/bookwyrm/migrations/0046_auto_20200921_1509.py b/bookwyrm/migrations/0046_auto_20200921_1509.py new file mode 100644 index 00000000..f0efd331 --- /dev/null +++ b/bookwyrm/migrations/0046_auto_20200921_1509.py @@ -0,0 +1,28 @@ +# Generated by Django 3.0.7 on 2020-09-21 15:09 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('bookwyrm', '0045_merge_20200810_2010'), + ] + + operations = [ + migrations.RenameField( + model_name='user', + old_name='fedireads_user', + new_name='bookwyrm_user', + ), + migrations.AlterField( + model_name='connector', + name='connector_file', + field=models.CharField(choices=[('openlibrary', 'Openlibrary'), ('self_connector', 'Self Connector'), ('bookwyrm_connector', 'Bookwyrm Connector')], max_length=255), + ), + migrations.AlterField( + model_name='sitesettings', + name='name', + field=models.CharField(default='1d8390fd.ngrok.io', max_length=100), + ), + ] diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index b38159cd..8d1276c7 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -77,9 +77,9 @@ WSGI_APPLICATION = 'bookwyrm.wsgi.application' # Database # https://docs.djangoproject.com/en/2.0/ref/settings/#databases -FEDIREADS_DATABASE_BACKEND = env('FEDIREADS_DATABASE_BACKEND', 'postgres') +BOOKWYRM_DATABASE_BACKEND = env('BOOKWYRM_DATABASE_BACKEND', 'postgres') -FEDIREADS_DBS = { +BOOKWYRM_DBS = { 'postgres': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': env('POSTGRES_DB', 'fedireads'), @@ -95,7 +95,7 @@ FEDIREADS_DBS = { } DATABASES = { - 'default': FEDIREADS_DBS[FEDIREADS_DATABASE_BACKEND] + 'default': BOOKWYRM_DBS[BOOKWYRM_DATABASE_BACKEND] } diff --git a/bookwyrm/tests/connectors/test_abstract_connector.py b/bookwyrm/tests/connectors/test_abstract_connector.py index 08f1f897..a7ec9dcb 100644 --- a/bookwyrm/tests/connectors/test_abstract_connector.py +++ b/bookwyrm/tests/connectors/test_abstract_connector.py @@ -7,7 +7,7 @@ from bookwyrm.connectors.abstract_connector import Mapping,\ from bookwyrm.connectors.bookwyrm_connector import Connector -class FedireadsConnector(TestCase): +class BookWyrmConnector(TestCase): def setUp(self): self.book = models.Edition.objects.create(title='Example Edition') diff --git a/bookwyrm/tests/connectors/test_fedireads_connector.py b/bookwyrm/tests/connectors/test_fedireads_connector.py index db1ce445..6645a936 100644 --- a/bookwyrm/tests/connectors/test_fedireads_connector.py +++ b/bookwyrm/tests/connectors/test_fedireads_connector.py @@ -9,7 +9,7 @@ from bookwyrm.connectors.bookwyrm_connector import Connector from bookwyrm.connectors.abstract_connector import SearchResult, get_date -class FedireadsConnector(TestCase): +class BookWyrmConnector(TestCase): def setUp(self): models.Connector.objects.create( identifier='example.com', diff --git a/bookwyrm/tests/models/test_base_model.py b/bookwyrm/tests/models/test_base_model.py index f6e6ac7b..14f8b7fb 100644 --- a/bookwyrm/tests/models/test_base_model.py +++ b/bookwyrm/tests/models/test_base_model.py @@ -2,13 +2,13 @@ from django.test import TestCase from bookwyrm import models -from bookwyrm.models.base_model import FedireadsModel +from bookwyrm.models.base_model import BookWyrmModel from bookwyrm.settings import DOMAIN class BaseModel(TestCase): def test_remote_id(self): - instance = FedireadsModel() + instance = BookWyrmModel() instance.id = 1 expected = instance.get_remote_id() self.assertEqual(expected, 'https://%s/bookwyrmmodel/1' % DOMAIN) @@ -16,7 +16,7 @@ class BaseModel(TestCase): def test_remote_id_with_user(self): user = models.User.objects.create_user( 'mouse', 'mouse@mouse.com', 'mouseword') - instance = FedireadsModel() + instance = BookWyrmModel() instance.user = user instance.id = 1 expected = instance.get_remote_id()