diff --git a/README.md b/README.md index bb13d221..b0a76da2 100644 --- a/README.md +++ b/README.md @@ -38,19 +38,3 @@ urlpatterns = [ path('', include("arches_rdm.urls")), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) ``` - -7. This project currently uses a frontend outside of Arches. To allow it to communicate with Django, add this to your project `settings.py`: - -``` -CORS_ALLOW_CREDENTIALS = True -CORS_ORIGIN_ALLOW_ALL = False -CORS_ORIGIN_WHITELIST = ["http://localhost:8080"] # vue frontend -CSRF_TRUSTED_ORIGINS = ["http://localhost:8080"] # vue frontend -``` - -NOTE: This rough draft currently assumes the Django backend is served at `https://127.0.0.1:8029/`. - -Run the frontend with: -``` -npm run serve -``` diff --git a/arches_rdm/migrations/0001_initial.py b/arches_rdm/migrations/0001_initial.py index 0e387196..322c9224 100644 --- a/arches_rdm/migrations/0001_initial.py +++ b/arches_rdm/migrations/0001_initial.py @@ -1,7 +1,5 @@ -from arches.app.models import models - - -from django.db import migrations, models +from django.db import migrations +from django.utils.translation import gettext as _ class Migration(migrations.Migration): @@ -15,23 +13,21 @@ class Migration(migrations.Migration): def add_plugins(apps, schema_editor): Plugin = apps.get_model("models", "Plugin") - Plugin.objects.update_or_create( + Plugin( pluginid="29321ce0-bd95-4357-a2a5-822e9cb06f70", - name="Reference Data Manager (RDM)", + name=_("Lingo"), icon="fa fa-code-fork", - component="views/components/plugins/reference-data-manager", - componentname="reference-data-manager", - config={}, - slug="reference-data-manager", - sortorder=0 - ) + component="App.vue", + componentname="lingo", + config={"show": True, "is_standalone": True}, + slug="lingo", + sortorder=0, + ).save() def remove_plugin(apps, schema_editor): Plugin = apps.get_model("models", "Plugin") - - for plugin in Plugin.objects.filter(pluginid__in=["29321ce0-bd95-4357-a2a5-822e9cb06f70"]): - plugin.delete() + Plugin.objects.filter(slug="lingo").delete() operations = [ migrations.RunPython(add_plugins, remove_plugin), - ] \ No newline at end of file + ] diff --git a/arches_rdm/src/App.vue b/arches_rdm/src/App.vue index bb7b8edd..8dd4ff71 100644 --- a/arches_rdm/src/App.vue +++ b/arches_rdm/src/App.vue @@ -8,16 +8,6 @@ const isAuthenticated = ref(false);