Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement django_private_chat2 into my project #46

Open
LieuMai opened this issue Aug 25, 2023 · 0 comments
Open

How to implement django_private_chat2 into my project #46

LieuMai opened this issue Aug 25, 2023 · 0 comments

Comments

@LieuMai
Copy link

LieuMai commented Aug 25, 2023

  • django_private_chat2 version: 1.0.2
  • Django version: 4.2.3
  • Python version: 3.11
  • Operating System: Windows

Description

I tried to implement this package to my project but when I go to http://127.0.0.1:8000/dialogs/ it show {"page": 1, "pages": 1, "data": []}

In my django admin page I saw the Dialogs and Messages, I add a dialogs and refresh http://127.0.0.1:8000/dialogs/ but it show {"page": 1, "pages": 1, "data": [{"id": 1, "created": 1692979771, "modified": 1692979771, "other_user_id": "2", "unread_count": 0, "username": "liaomei", "last_message": null}]}

What I Did

I followed the quick start step and add the css, js and root id div into my template

base.html

    {% block css %}{% endblock %}
    <title>dimsum - {% block title %}{% endblock title %}</title>
  </head>

  <body>
    {% include 'components/modals.html' %}
    {% include 'components/navbar.html' %}
    <div class="ui container">
      <div id="root"></div>
      {% block content %}
      {% endblock content %}
    </div>

    {% block scripts %}{% endblock scripts %}
    {% block extra_js %}{% endblock %}

settings.py

ASGI_APPLICATION = "dimsum.asgi.application"

CHANNEL_LAYERS = {
    "default": {
        "BACKEND": "channels_redis.core.RedisChannelLayer",
        "CONFIG": {
            "hosts": [("127.0.0.1", 6379)],
        },
    },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant