From fbd19b1c796866f8a847488aad063d3cf16f33a1 Mon Sep 17 00:00:00 2001 From: Bastien Abadie <bastien@nextcairn.com> Date: Mon, 7 May 2018 15:35:20 +0200 Subject: [PATCH] Rename inner arkindex to project --- arkindex/documents/models.py | 2 +- arkindex/documents/serializers.py | 2 +- arkindex/images/importer.py | 2 +- arkindex/images/models.py | 4 ++-- arkindex/manage.py | 2 +- arkindex/{arkindex => project}/__init__.py | 0 arkindex/{arkindex => project}/api_v1.py | 0 arkindex/{arkindex => project}/models.py | 0 arkindex/{arkindex => project}/settings.py | 4 ++-- arkindex/{arkindex => project}/tools.py | 0 arkindex/{arkindex => project}/urls.py | 2 +- arkindex/{arkindex => project}/views.py | 0 arkindex/{arkindex => project}/wsgi.py | 2 +- 13 files changed, 10 insertions(+), 10 deletions(-) rename arkindex/{arkindex => project}/__init__.py (100%) rename arkindex/{arkindex => project}/api_v1.py (100%) rename arkindex/{arkindex => project}/models.py (100%) rename arkindex/{arkindex => project}/settings.py (98%) rename arkindex/{arkindex => project}/tools.py (100%) rename arkindex/{arkindex => project}/urls.py (85%) rename arkindex/{arkindex => project}/views.py (100%) rename arkindex/{arkindex => project}/wsgi.py (80%) diff --git a/arkindex/documents/models.py b/arkindex/documents/models.py index 87d1822121..b8a2fca572 100644 --- a/arkindex/documents/models.py +++ b/arkindex/documents/models.py @@ -1,7 +1,7 @@ from django.db import models from django.urls import reverse from enumfields import EnumField, Enum -from arkindex.models import IndexableModel +from arkindex.project.models import IndexableModel from documents.managers import ElementManager import uuid diff --git a/arkindex/documents/serializers.py b/arkindex/documents/serializers.py index 98c2b4f0ec..adec1edc89 100644 --- a/arkindex/documents/serializers.py +++ b/arkindex/documents/serializers.py @@ -3,7 +3,7 @@ from django.conf import settings from documents.models import Element, Transcription, Page, ElementType from images.models import Image, Zone from images.serializers import ZoneSerializer, ImageSerializer -from arkindex.tools import sslify_url +from arkindex.project.tools import sslify_url class EnumField(serializers.Field): diff --git a/arkindex/images/importer.py b/arkindex/images/importer.py index 742ad1cbaf..373e8d033b 100644 --- a/arkindex/images/importer.py +++ b/arkindex/images/importer.py @@ -1,6 +1,6 @@ from images.models import Zone, Image from documents.models import Transcription, ElementLink -from arkindex.tools import BoundingBox +from arkindex.project.tools import BoundingBox import os import re import gzip diff --git a/arkindex/images/models.py b/arkindex/images/models.py index 552085311e..d270d5689e 100644 --- a/arkindex/images/models.py +++ b/arkindex/images/models.py @@ -5,8 +5,8 @@ from django.utils.functional import cached_property from elasticsearch import Elasticsearch from elasticsearch.helpers import bulk as es_bulk from documents.models import Transcription -from arkindex.models import IndexableModel -from arkindex.tools import BoundingBox +from arkindex.project.models import IndexableModel +from arkindex.project.tools import BoundingBox import requests import urllib.parse diff --git a/arkindex/manage.py b/arkindex/manage.py index 1e7dd70801..2278abfce0 100755 --- a/arkindex/manage.py +++ b/arkindex/manage.py @@ -3,7 +3,7 @@ import os import sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arkindex.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arkindex.project.settings") try: from django.core.management import execute_from_command_line except ImportError: diff --git a/arkindex/arkindex/__init__.py b/arkindex/project/__init__.py similarity index 100% rename from arkindex/arkindex/__init__.py rename to arkindex/project/__init__.py diff --git a/arkindex/arkindex/api_v1.py b/arkindex/project/api_v1.py similarity index 100% rename from arkindex/arkindex/api_v1.py rename to arkindex/project/api_v1.py diff --git a/arkindex/arkindex/models.py b/arkindex/project/models.py similarity index 100% rename from arkindex/arkindex/models.py rename to arkindex/project/models.py diff --git a/arkindex/arkindex/settings.py b/arkindex/project/settings.py similarity index 98% rename from arkindex/arkindex/settings.py rename to arkindex/project/settings.py index 17ec326720..1d11d4ef77 100644 --- a/arkindex/arkindex/settings.py +++ b/arkindex/project/settings.py @@ -59,7 +59,7 @@ MIDDLEWARE = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] -ROOT_URLCONF = 'arkindex.urls' +ROOT_URLCONF = 'arkindex.project.urls' TEMPLATES = [ { @@ -79,7 +79,7 @@ TEMPLATES = [ }, ] -WSGI_APPLICATION = 'arkindex.wsgi.application' +WSGI_APPLICATION = 'arkindex.project.wsgi.application' # Database diff --git a/arkindex/arkindex/tools.py b/arkindex/project/tools.py similarity index 100% rename from arkindex/arkindex/tools.py rename to arkindex/project/tools.py diff --git a/arkindex/arkindex/urls.py b/arkindex/project/urls.py similarity index 85% rename from arkindex/arkindex/urls.py rename to arkindex/project/urls.py index dfebd81ca5..50068c1010 100644 --- a/arkindex/arkindex/urls.py +++ b/arkindex/project/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import url, include from django.contrib import admin -from arkindex.api_v1 import api +from arkindex.project.api_v1 import api urlpatterns = [ url(r'^api/v1/', include((api, 'api'), namespace='api')), diff --git a/arkindex/arkindex/views.py b/arkindex/project/views.py similarity index 100% rename from arkindex/arkindex/views.py rename to arkindex/project/views.py diff --git a/arkindex/arkindex/wsgi.py b/arkindex/project/wsgi.py similarity index 80% rename from arkindex/arkindex/wsgi.py rename to arkindex/project/wsgi.py index 9b5740e40c..b3bd1b3c8b 100644 --- a/arkindex/arkindex/wsgi.py +++ b/arkindex/project/wsgi.py @@ -11,6 +11,6 @@ import os from django.core.wsgi import get_wsgi_application -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arkindex.settings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arkindex.project.settings") application = get_wsgi_application() -- GitLab