From: Tom S Date: Thu, 22 Nov 2012 12:08:26 +0000 (+0000) Subject: clarify code example for integration X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=caace8a03d52bfc57d1fb079a56287253d9dbd5f;p=django-jqchat.git clarify code example for integration --- diff --git a/docs/index.rst b/docs/index.rst index 5de4059..5927691 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -47,9 +47,12 @@ Integration The easiest way to add a jqchat room to an existing model is to create a OneToOne field on the existing model. For example:: - from myapp.models import Room - chat_room = models.OneToOneField(Room, help_text='Chat - room to be used for this lobby.') + from django.db import models + from jqchat.models import Room + + class MyModel(models.Model): + name = models.CharField(max_length=20) + chat_room = models.OneToOneField(Room) In the jqchat templates folder you will find chat_test.html; you will have to pull out some code and