diff --git a/Pipfile b/Pipfile
index fc9da13..8eb409b 100644
--- a/Pipfile
+++ b/Pipfile
@@ -21,6 +21,7 @@ whitenoise = "==4.1.2"
psycopg2 = "==2.7.7"
dj-database-url = "==0.5.0"
drf-yasg = "==1.16.0"
+django-cors-headers = "*"
[dev-packages]
coverage = "==4.0.3"
diff --git a/Pipfile.lock b/Pipfile.lock
index 6e405a7..202fea7 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
- "sha256": "b06bbacc8ea104f7dde650fe2b0616247c190890e4826b68a57e6f8649a7672a"
+ "sha256": "54a9532c28cf7bd19577cc7c952df2b0fa76d58cb614cd090d578731ccc4c060"
},
"pipfile-spec": 6,
"requires": {
@@ -75,6 +75,14 @@
"index": "pypi",
"version": "==2.0.0"
},
+ "django-cors-headers": {
+ "hashes": [
+ "sha256:5b80bf0f8d7fc6e2bcb4f40781d5ff3661961bbf1982e52daec77241dea3b890",
+ "sha256:ebf3e2cf25aa6993b959a8e6a87828ebb3c8fe5bc3ec4a2d6e65f3b8d9b4212c"
+ ],
+ "index": "pypi",
+ "version": "==3.0.2"
+ },
"django-extensions": {
"hashes": [
"sha256:6fcedb2ea660c9dbf9ac59441721ffdd4ab5b753fbd6159c3e28f391a65bab46",
diff --git a/README.md b/README.md
index a69ee05..9cc5608 100644
--- a/README.md
+++ b/README.md
@@ -7,15 +7,13 @@
Catholic Orthodoxy in electronic format
-## Site
+## URLs
-
+1. Site:
+1. API root:
+1. Swagger documentation:
-## API
-
-The API root URL is located at . The swagger documentation is available at .
-
-The following API endpoints have been exposed
+## Available endpoints
1.
1.
@@ -37,6 +35,17 @@ It is possible to recreate the database on your local machine as the necessary `
1. Optional. Create superuser with `python manage.py superuser`
1. Optional. Create user with `python manage.py user`
1. Both have the following optional arguments `-email admin@ethodoxy.net -password dwarfstar`
+1. Create a `PostgreSQL` database name `ethodoxy-api`.
+1. Set up the following environment variables
+
+ DEBUG
+ DJANGO_SETTINGS_MODULE=ethodoxy-api.settings.dev
+ SECRET_KEY
+ EMAIL_HOST_PASSWORD
+ EMAIL_PORT
+ ALLOWED_HOSTS=localhost
+ DATABASE_URL
+ DB_PASSWORD
1. Set up **Douay-Rheims** bible database by running the following commands in order
@@ -45,12 +54,11 @@ It is possible to recreate the database on your local machine as the necessary `
python manage.py create_nt
python manage.py create_chapters
python manage.py create_verses
-
-1. Set up Challoner commentary by running `python manage.py create_commentary`
+ python manage.py create_commentary # challoner commentary
## Contributing
-I am still working on this project and I haven't quite figured out how to query verses.
+I haven't figured it out yet. Feel free to message me at orjichidi95@gmail.com
## Querying
diff --git a/ethodoxy-api/settings/base.py b/ethodoxy-api/settings/base.py
index fbdc50f..056676e 100644
--- a/ethodoxy-api/settings/base.py
+++ b/ethodoxy-api/settings/base.py
@@ -64,17 +64,25 @@
]
THIRD_PARTY_APPS = [
+ 'corsheaders',
'rest_framework',
'django_extensions',
'drf_yasg',
]
+CORS_ORIGIN_ALLOW_ALL = True;
+
+CORS_ALLOW_METHODS = [
+ 'GET',
+]
+
INSTALLED_APPS = PREREQ_APPS + PROJECT_APPS + THIRD_PARTY_APPS
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
+ 'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',