Models

These are the Django model object definitions used in application with Django ORM.

class djangoapp_sample.models.article.Article(*args, **kwargs)[source]

A simple article for a blog.

blog

Required related Blog object.

Type:

models.ForeignKey

title

Required title string.

Type:

models.CharField

content

Optionnal text content.

Type:

models.TextField

publish_start

Required publication date determine when article will be available.

Type:

models.DateTimeField

get_absolute_url()[source]

Return absolute URL to the article detail view.

Returns:

An URL.

Return type:

string

class djangoapp_sample.models.blog.Blog(*args, **kwargs)[source]

A very simple blog to contain articles.

title

Required unique title string.

Type:

models.CharField

get_absolute_url()[source]

Return absolute URL to the blog detail view.

Returns:

An URL.

Return type:

string

class djangoapp_sample.models.blog.BlogPluginModel(*args, **kwargs)[source]

Blog plugin model.

blog

Related blog.

Type:

models.ForeignKey

limit

Maximum number of articles to list from a blog.

Type:

models.IntegerField