From caace8a03d52bfc57d1fb079a56287253d9dbd5f Mon Sep 17 00:00:00 2001 From: Tom S Date: Thu, 22 Nov 2012 12:08:26 +0000 Subject: [PATCH] clarify code example for integration --- docs/index.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 -- 2.39.5