Click on an example type in the sidebar to interact with a live table and read details on how it can be implemented.
Your database tables appear sync'd! Check out the example pages at your leisure.
The demos and example code found in this example project all rely on the automatic
initialization provided by a simple jQuery
document.ready event. A couple of
the pages use additional static resources (Bootstrap theme, x-editable); these pages include
an HTML comment in the source that highlights their use in the live demo.
Aside from the primary value of this set of examples as a reference site, noteworthy topics that branch outside of basic syntax are:
The main model used in most of the examples is
Entry, because of its diverse
Blog makes a simple relationship demonstration possible, and
Author helps shed light on how to handle
many to many relationships.
class Blog(models.Model): name = models.CharField(max_length=100) tagline = models.TextField() class Author(models.Model): name = models.CharField(max_length=50) email = models.EmailField() class Entry(models.Model): blog = models.ForeignKey(Blog) headline = models.CharField(max_length=255) body_text = models.TextField() pub_date = models.DateField() mod_date = models.DateField() authors = models.ManyToManyField(Author) n_comments = models.IntegerField() n_pingbacks = models.IntegerField() rating = models.IntegerField()