Skip to content

Commit 5989506

Browse files
committed
Refactor: Add new garaphQL project
1 parent aa6f85f commit 5989506

31 files changed

+177
-323
lines changed

README.md

+6-27
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,22 @@
1-
# homework
2-
> Simple django rest API base project which the API will support `web`, `desktop`, `mobile` etc devices.
1+
# djangoGraphQL
2+
> GraphQl backend web application
33
44
### Installing Geospatial libraries
5-
#### Dependancy
5+
#### Dependency
66
- Python 3.8.5
77
- Django 3.1.5
88
- Postgres 12.3
99

1010
The following steps will walk you thru installation on a Mac. Linux should be similar. It's also possible to develop on a Windows machine, but I have not documented the steps. If you've developed `Homework` backend `API` app on Windows, you should have little problem getting up and running.
1111

1212

13-
14-
### Create Database
15-
16-
Create the database by running the following commands in a psql shell. If you're using
17-
Postgres.app, click the Postgres.app icon in your toolbar and select "Open psql".
18-
19-
```
20-
create database "homework";
21-
create user "macair";
22-
ALTER ROLE "macair" WITH PASSWORD 'sagor123';
23-
GRANT ALL PRIVILEGES ON DATABASE "homework" TO "macair";
24-
ALTER USER macair CREATEDB;
25-
CREATE EXTENSION postgis;
13+
#### Run the project in your local development environment.
2614
```
27-
28-
29-
#### Run the poject in your local development environment.
30-
```
31-
git clone https://github.com/mbrsagor/homework.git
32-
cd homework
15+
git clone https://github.com/mbrsagor/djangoGraphQL.git
16+
cd djangoGraphQL
3317
virtualenv venv --python=python3.8
3418
source venv/bin/activate
3519
./manage.py migrate
3620
./manage.py createsuperuser
3721
./manage.py runserver
3822
```
39-
40-
###### How to access/pass token in API test software like postman.
41-
- 1st select header tab
42-
- key => Authorization
43-
- value => `Bearer` your-token

config/db_config.py

-10
This file was deleted.

contacts/admin.py

-4
This file was deleted.

contacts/apps.py

-5
This file was deleted.

contacts/migrations/0001_initial.py

-33
This file was deleted.

contacts/models/__init__.py

-10
This file was deleted.

contacts/models/base.py

-6
This file was deleted.

contacts/models/pin.py

-47
This file was deleted.

contacts/models/types.py

-11
This file was deleted.

contacts/serializers/auth_serializer.py

-50
This file was deleted.

contacts/serializers/type_serializer.py

-8
This file was deleted.

contacts/urls.py

-12
This file was deleted.

contacts/views/auth_view.py

-20
This file was deleted.

contacts/views/type_view.py

-18
This file was deleted.
File renamed without changes.
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
"""
2-
ASGI config for homework project.
2+
ASGI config for djangoGraphQL project.
33
44
It exposes the ASGI callable as a module-level variable named ``application``.
55
66
For more information on this file, see
7-
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
7+
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
88
"""
99

1010
import os
1111

1212
from django.core.asgi import get_asgi_application
1313

14-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'homework.settings')
14+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoGraphQL.settings')
1515

1616
application = get_asgi_application()

0 commit comments

Comments
 (0)