Skip to content

Commit f27b590

Browse files
committed
first commit
1 parent 03175e4 commit f27b590

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ pip install -r requirements.txt
1919
db.sqlite3
2020
```
2121

22-
#### Add PostgreSQL db
22+
#### Add PostgreSQL db (discomment the code in settings.py)
2323

2424
```bash
25-
db.sqlite3
25+
LOCAL_DB_NAME=db-name
26+
LOCAL_DB_USER=
27+
LOCAL_DB_PASSWORD=
28+
LOCAL_DB_HOST=127.0.0.1
29+
LOCAL_DB_PORT=5432
2630
```
2731

2832
#### Migrate models

api/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from django.utils import timezone
33
from django.db import models
44
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
5-
from model_utils import Choices
65
from .managers import CustomUserManager
76

87

service/asgi.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,8 @@
99

1010
import os
1111

12-
from channels.routing import ProtocolTypeRouter, URLRouter
1312
from django.core.asgi import get_asgi_application
14-
from django.urls import path, include
15-
16-
from api.consumer import ChatConsumer
17-
from channels.auth import AuthMiddlewareStack
1813

1914
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'service.settings')
2015

2116
django_asgi_app = get_asgi_application()
22-
23-
application = ProtocolTypeRouter({
24-
"http": django_asgi_app,
25-
# Just HTTP for now. (We can add other protocols later.)
26-
"websocket": AuthMiddlewareStack(
27-
URLRouter(
28-
#[path('ws/match/', MatchConsumer.as_asgi())]
29-
[path('ws/chat/<str:room_name>/', ChatConsumer.as_asgi())]
30-
)
31-
)
32-
})

0 commit comments

Comments
 (0)