mirror of
https://github.com/Reckless-Satoshi/robosats.git
synced 2024-09-11 11:55:26 +03:00
Create new chat app, configure urls
This commit is contained in:
parent
5df2134fb2
commit
f4b14baf69
0
chat/__init__.py
Normal file
0
chat/__init__.py
Normal file
3
chat/admin.py
Normal file
3
chat/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
6
chat/apps.py
Normal file
6
chat/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ChatConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'chat'
|
3
chat/models.py
Normal file
3
chat/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
3
chat/tests.py
Normal file
3
chat/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
8
chat/urls.py
Normal file
8
chat/urls.py
Normal file
@ -0,0 +1,8 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.index, name='index'),
|
||||
path('<str:order_id>/', views.room, name='room'),
|
||||
]
|
3
chat/views.py
Normal file
3
chat/views.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
@ -39,7 +39,9 @@ INSTALLED_APPS = [
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'rest_framework',
|
||||
'channels',
|
||||
'api',
|
||||
'chat',
|
||||
'frontend.apps.FrontendConfig',
|
||||
]
|
||||
|
||||
|
@ -19,5 +19,6 @@ from django.urls import path, include
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('api/', include('api.urls')),
|
||||
path('', include('frontend.urls'))
|
||||
path('chat/', include('chat.urls')),
|
||||
path('', include('frontend.urls')),
|
||||
]
|
||||
|
3
setup.md
3
setup.md
@ -33,6 +33,9 @@ source /usr/local/bin/virtualenvwrapper.sh
|
||||
## Install Django admin relational links
|
||||
`pip install django-admin-relation-links`
|
||||
|
||||
## Install Django channels for websockets
|
||||
`pip install channels`
|
||||
|
||||
*Django 4.0 at the time of writting*
|
||||
|
||||
### Launch the local development node
|
||||
|
Loading…
Reference in New Issue
Block a user