]> git.parisson.com Git - django-jqchat.git/commitdiff
clarify code example for integration
authorTom S <scytale@gmail.com>
Thu, 22 Nov 2012 12:08:26 +0000 (12:08 +0000)
committerTom S <scytale@gmail.com>
Thu, 22 Nov 2012 12:08:26 +0000 (12:08 +0000)
docs/index.rst

index 5de40594de9f701475f3f86bfaf89017f20a351b..592769130825042964da4abc0a5943d0e0d25b11 100644 (file)
@@ -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