Models for Zinnia
Bases: zinnia.models.entry.EntryAbstractClass
The final Entry model based on inheritence.
Parameters: |
|
---|
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Builds and returns the entry’s URL based on the slug and the creation date.
Bases: django.contrib.auth.models.User
Proxy model around django.contrib.auth.models.User.
Parameters: |
|
---|
Bases: django.contrib.auth.models.DoesNotExist
Bases: django.contrib.auth.models.MultipleObjectsReturned
Returns author’s published entries.
Builds and returns the author’s URL based on his username.
Bases: mptt.models.MPTTModel
Simple model for categorizing entries.
Parameters: |
|
---|
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Returns category’s published entries.
Builds and returns the category’s URL based on his tree path.
Returns category’s tree path by concatening the slug of his ancestors.
Author model for Zinnia
Bases: django.contrib.auth.models.User
Proxy model around django.contrib.auth.models.User.
Parameters: |
|
---|
Bases: django.contrib.auth.models.DoesNotExist
Bases: django.contrib.auth.models.MultipleObjectsReturned
Returns author’s published entries.
Builds and returns the author’s URL based on his username.
Category model for Zinnia
Bases: mptt.models.MPTTModel
Simple model for categorizing entries.
Parameters: |
|
---|
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Returns category’s published entries.
Builds and returns the category’s URL based on his tree path.
Returns category’s tree path by concatening the slug of his ancestors.
Entry model for Zinnia
Bases: django.db.models.base.Model
Abstract model class to add relationship between the entries and their authors.
Bases: django.db.models.base.Model
Abstract model class to categorize the entries.
Bases: django.db.models.base.Model
Abstract content model class providing field and methods to write content inside an entry.
Parameters: | content (TextField) – Content |
---|
Returns the “content” field formatted in HTML.
Counts the number of words used in the content.
Bases: django.db.models.base.Model
Abstract model class to display entry’s content with a custom template.
Parameters: | content_template (CharField) – Template used to display the entry’s content. |
---|
Bases: django.db.models.base.Model
Abstract core entry model class providing the fields and methods required for publishing content over time.
Parameters: |
|
---|
CoreEntry’s meta informations.
Builds and returns the entry’s URL based on the slug and the creation date.
Checks if an entry is within his publication period.
Checks if an entry is visible and published.
Returns the entry’s short url.
Bases: django.db.models.base.Model
Abstract model class to display entries with a custom template if needed on the detail page.
Parameters: | detail_template (CharField) – Template used to display the entry’s detail page. |
---|
Bases: django.db.models.base.Model
Abstract discussion model class providing the fields and methods to manage the discussions (comments, pingbacks, trackbacks).
Parameters: |
|
---|
Returns a queryset of the published comments.
Checks if the comments are open with the AUTO_CLOSE_COMMENTS_AFTER setting.
Checks if a type of discussion is still open are a certain number of days.
Returns a queryset of the published discussions.
Returns a queryset of the published pingbacks.
Checks if the pingbacks are open with the AUTO_CLOSE_PINGBACKS_AFTER setting.
Return a queryset of the published trackbacks.
Checks if the trackbacks are open with the AUTO_CLOSE_TRACKBACKS_AFTER setting.
Bases: zinnia.models.entry.EntryAbstractClass
The final Entry model based on inheritence.
Parameters: |
|
---|
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Builds and returns the entry’s URL based on the slug and the creation date.
Bases: zinnia.models.entry.CoreEntry, zinnia.models.entry.ContentEntry, zinnia.models.entry.DiscussionsEntry, zinnia.models.entry.RelatedEntry, zinnia.models.entry.ExcerptEntry, zinnia.models.entry.ImageEntry, zinnia.models.entry.FeaturedEntry, zinnia.models.entry.AuthorsEntry, zinnia.models.entry.CategoriesEntry, zinnia.models.entry.TagsEntry, zinnia.models.entry.LoginRequiredEntry, zinnia.models.entry.PasswordRequiredEntry, zinnia.models.entry.ContentTemplateEntry, zinnia.models.entry.DetailTemplateEntry
Final abstract entry model class assembling all the abstract entry model classes into a single one.
In this manner we can override some fields without reimplemting all the EntryAbstractClass.
Parameters: |
|
---|
Bases: django.db.models.base.Model
Abstract model class to add an excerpt to the entries.
Parameters: | excerpt (TextField) – Optional element. |
---|
Bases: django.db.models.base.Model
Abstract model class to mark entries as featured.
Parameters: | featured (BooleanField) – Featured |
---|
Bases: django.db.models.base.Model
Abstract model class to add an image to the entries.
Parameters: | image (ImageField) – Used for illustration. |
---|
Bases: django.db.models.base.Model
Abstract model class to restrcit the display of the entry on authenticated users.
Parameters: | login_required (BooleanField) – Only authenticated users can view the entry. |
---|
Bases: django.db.models.base.Model
Abstract model class to restrict the display of the entry to users knowing the password.
Parameters: | password (CharField) – Protects the entry with a password. |
---|
Bases: django.db.models.base.Model
Abstract model class for making manual relations between the differents entries.
Returns only related entries published.
Bases: django.db.models.base.Model
Abstract lodel class to add tags to the entries.
Parameters: | tags (TagField) – Tags |
---|
Return iterable list of tags.
Determine the base Model to inherit in the Entry Model, this allow to overload it.