Comments (5)
Hi. I rewrote the docs to make it more clear. It was a bit messy yes, specially the client side handlers: this should be better now. Thanks for mentioning it.
Please check out the client side handlers part and let me know if anything is unclear or wrong anymore
from django-instant.
hello,
My template directory is like this
templates
I_ instant
I_ handlers
I- default.js
Into default.js i get :
if (channel === "public") {
console.log(message)
}
But nothing into console.log. I enable watch option on instant admin, i could see messages.
Any idea please ?
from django-instant.
The default public channel name is settings.SITE_SLUG_public
, so if your SITE_SLUG
value in settings is my_site
, your channel will be named mysite_public
.
You can check in the debug console for the connected channels. Note: it is better to use declarative channels: it is more explicit and you can even control where it should connect from. In settings, and the default public channel will be deprecated in the future
INSTANT_ENABLE_PUBLIC_CHANNEL = False # do not use the default chan
# declare my chan
INSTANT_PUBLIC_CHANNELS = [
['public_chan'],
]
Then use a templates/instant/handlers/public_chan.js
handler, or just stick with the default handler
I plan to work on better error messages btw,
{Edit]:
I enable watch option on instant admin, i could see messages.
Check the channel name in the json console message to make sure it is ok
{Edit 2]
nothing into console.log
Did you set the INSTANT_DEBUG
setting to True? It should show you if you are connected on a channel or not. Did you include the client template?
from django-instant.
my bad again !
In my different tests to make it work i remove the client.
Thanks i'm on the way now ;).
from django-instant.
That's it! Enjoy
from django-instant.
Related Issues (20)
- from string import lower => lower() HOT 1
- centrifuge/auth/ HOT 6
- Typo in centrifugo connection error go process HOT 3
- Build fail on python 3.5 on travis.ci HOT 1
- Benchmarks HOT 1
- Support the Centrifugo Redis API HOT 2
- Declarative channels
- Database channels HOT 1
- Embed channels in external modules HOT 1
- Channels handlers HOT 9
- Behind a proxy HOT 1
- New frontend HOT 1
- Example not working HOT 3
- running the python3 manage.py installws throws this error HOT 6
- Handle the events in Python-side. HOT 2
- Updates for centrifugo v4 HOT 2
- Issue: Not compatible with Custom User Model (without username) HOT 1
- AttributeError at /instant/login/ 'User' object has no attribute 'is_superuser' HOT 5
- ImportError: cannot import name 'instant_auth'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-instant.