Skip to content

Commit 3453600

Browse files
fix: removed the docker part from readme (keploy#5)
Signed-off-by: Shashwat79802 <shashwatg79802@gmail.com>
1 parent b6a32e8 commit 3453600

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

django-postgres/README.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# User Data CRUD Application
22

3-
A sample user data CRUD app to test Keploy integration capabilities using [Django](https://www.djangoproject.com/) and PostgreSQL. <br>
3+
A sample user data CRUD app to test Keploy integration capabilities using [Django](https://www.djangoproject.com/) and [PostgreSQL](https://www.postgresql.org/). <br>
44
Make the following requests to the respective endpoints -
55

66
1. `GET /user/` - To get all the data at once.
@@ -138,18 +138,4 @@ Now let's run the application in test mode.
138138
sudo -E keploy test -c "python3 manage.py runserver" --delay 10
139139
```
140140

141-
So no need to setup fake database/apis like Postgres or write mocks for them. Keploy automatically mocks them and, **The application thinks it's talking to Postgres 😄**
142-
143-
# Using Docker
144-
145-
Keploy can be used on Linux & Windows through Docker, and on MacOS by the help of [Colima](https://docs.keploy.io/docs/server/macos/installation/#using-colima)
146-
147-
## Create Keploy Alias
148-
149-
To establish a network for your application using Keploy on Docker, follow these steps.
150-
151-
If you're using a docker-compose network, replace keploy-network with your app's `docker_compose_network_name` below.
152-
153-
```shell
154-
alias keploy='sudo docker run --pull always --name keploy-v2 -p 16789:16789 --privileged --pid=host -it -v "$(pwd)":/files -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/keploy/keploy'
155-
```
141+
So, no need to setup fake database/apis like Postgres or write mocks for them. Keploy automatically mocks them and, **The application thinks it's talking to Postgres 😄**

django-postgres/django_postgres/application/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,16 @@ def get_update_deleteUser(request, uuid: uuid4):
3838
return JsonResponse({"message": "User Deleted!!"})
3939
except Exception as e:
4040
return JsonResponse({"message": str(e)[2:-2]})
41-
41+
42+
4243
@api_view(["GET", "POST"])
4344
def getAll_createUser(request):
4445

4546
if request.method == "GET":
4647
try:
4748
data = UserSerializer(User.objects.all(), many=True)
49+
if data.data == []:
50+
return JsonResponse({"message": "No Users Found!!"})
4851
return Response(data.data)
4952
except Exception as e:
5053
return JsonResponse({"message": str(e)})

0 commit comments

Comments
 (0)