Package zinnia :: Module models :: Class EntryAbstractClass
[hide private]

Class EntryAbstractClass

source code


Base Model design for publishing entries

Nested Classes [hide private]
  Meta

Inherited from django.db.models.base.Model: __metaclass__

Instance Methods [hide private]
 
objects(...)
 
published(...)
 
__unicode__(self) source code
 
get_absolute_url(*args, **kwargs)
Return entry's URL
 
get_next_by_creation_date(*moreargs, **morekwargs)
 
get_next_by_end_publication(*moreargs, **morekwargs)
 
get_next_by_last_update(*moreargs, **morekwargs)
 
get_next_by_start_publication(*moreargs, **morekwargs)
 
get_previous_by_creation_date(*moreargs, **morekwargs)
 
get_previous_by_end_publication(*moreargs, **morekwargs)
 
get_previous_by_last_update(*moreargs, **morekwargs)
 
get_previous_by_start_publication(*moreargs, **morekwargs)
 
get_status_display(*moreargs, **morekwargs)
 
get_template_display(*moreargs, **morekwargs)

Inherited from django.db.models.base.Model: __eq__, __hash__, __init__, __ne__, __reduce__, __repr__, __str__, clean, clean_fields, date_error_message, delete, full_clean, prepare_database_save, save, save_base, serializable_value, unique_error_message, validate_unique

Inherited from django.db.models.base.Model (private): _collect_sub_objects, _get_FIELD_display, _get_next_or_previous_by_FIELD, _get_next_or_previous_in_order, _get_pk_val, _get_unique_checks, _perform_date_checks, _perform_unique_checks, _set_pk_val

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  STATUS_CHOICES = DRAFT, _('draft'), (HIDDEN, _('hidden')), (PU...
  title = models.CharField(_('title'), max_length= 255)
  image = models.ImageField(_('image'), upload_to= UPLOAD_TO, bl...
  content = models.TextField(_('content'))
  excerpt = models.TextField(_('excerpt'), blank= True, help_tex...
  tags = TagField(_('tags'))
  categories = models.ManyToManyField(Category, verbose_name= _(...
  related = models.ManyToManyField('self', verbose_name= _('rela...
  slug = models.SlugField(help_text= _('used for publication'), ...
  authors = models.ManyToManyField(User, verbose_name= _('author...
  status = models.IntegerField(choices= STATUS_CHOICES, default=...
  featured = models.BooleanField(_('featured'), default= False)
  comment_enabled = models.BooleanField(_('comment enabled'), de...
  pingback_enabled = models.BooleanField(_('linkback enabled'), ...
  creation_date = models.DateTimeField(_('creation date'), defau...
  last_update = models.DateTimeField(_('last update'), default= ...
  start_publication = models.DateTimeField(_('start publication'...
  end_publication = models.DateTimeField(_('end publication'), h...
  sites = models.ManyToManyField(Site, verbose_name= _('sites pu...
  login_required = models.BooleanField(_('login required'), defa...
  password = models.CharField(_('password'), max_length= 50, bla...
  template = models.CharField(_('template'), max_length= 250, de...
  _default_manager = <django.db.models.manager.Manager object at...
  _meta = <Options for EntryAbstractClass>

Inherited from django.db.models.base.Model (private): _deferred

Properties [hide private]
  html_content
Return the content correctly formatted
  previous_entry
Return the previous entry
  next_entry
Return the next entry
  word_count
Count the words of an entry
  is_actual
Check if an entry is within publication period
  is_visible
Check if an entry is visible on site
  related_published_set
Return only related entries published
  discussions
Return published discussions
  comments
Return published comments
  pingbacks
Return published pingbacks
  trackbacks
Return published trackbacks
  short_url
Return the entry's short url

Inherited from django.db.models.base.Model: pk

Inherited from object: __class__

Method Details [hide private]

get_absolute_url(*args, **kwargs)

 

Return entry's URL

Decorators:
  • @models.permalink

Class Variable Details [hide private]

STATUS_CHOICES

Value:
DRAFT, _('draft'), (HIDDEN, _('hidden')), (PUBLISHED, _('published'))

image

Value:
models.ImageField(_('image'), upload_to= UPLOAD_TO, blank= True, help_\
text= _('used for illustration'))

excerpt

Value:
models.TextField(_('excerpt'), blank= True, help_text= _('optional ele\
ment'))

categories

Value:
models.ManyToManyField(Category, verbose_name= _('categories'), blank=\
 True, null= True)

related

Value:
models.ManyToManyField('self', verbose_name= _('related entries'), bla\
nk= True, null= True)

slug

Value:
models.SlugField(help_text= _('used for publication'), unique_for_date\
= 'creation_date', max_length= 255)

authors

Value:
models.ManyToManyField(User, verbose_name= _('authors'), blank= True, \
null= False)

status

Value:
models.IntegerField(choices= STATUS_CHOICES, default= DRAFT)

comment_enabled

Value:
models.BooleanField(_('comment enabled'), default= True)

pingback_enabled

Value:
models.BooleanField(_('linkback enabled'), default= True)

creation_date

Value:
models.DateTimeField(_('creation date'), default= datetime.now)

last_update

Value:
models.DateTimeField(_('last update'), default= datetime.now)

start_publication

Value:
models.DateTimeField(_('start publication'), help_text= _('date start \
publish'), default= datetime.now)

end_publication

Value:
models.DateTimeField(_('end publication'), help_text= _('date end publ\
ish'), default= datetime(2042, 3, 15))

sites

Value:
models.ManyToManyField(Site, verbose_name= _('sites publication'))

login_required

Value:
models.BooleanField(_('login required'), default= False, help_text= _(\
'only authenticated users can view the entry'))

password

Value:
models.CharField(_('password'), max_length= 50, blank= True, help_text\
= _('protect the entry with a password'))

template

Value:
models.CharField(_('template'), max_length= 250, default= 'zinnia/entr\
y_detail.html', choices= [('zinnia/entry_detail.html', _('Default temp\
late'))]+ ENTRY_TEMPLATES, help_text= _('template used to display the \
entry'))

_default_manager

Value:
<django.db.models.manager.Manager object at 0x935cc8c>

Property Details [hide private]

html_content

Return the content correctly formatted

Get Method:
unreachable.html_content(self) - Return the content correctly formatted

previous_entry

Return the previous entry

Get Method:
unreachable.previous_entry(self) - Return the previous entry

next_entry

Return the next entry

Get Method:
unreachable.next_entry(self) - Return the next entry

word_count

Count the words of an entry

Get Method:
unreachable.word_count(self) - Count the words of an entry

is_actual

Check if an entry is within publication period

Get Method:
unreachable.is_actual(self) - Check if an entry is within publication period

is_visible

Check if an entry is visible on site

Get Method:
unreachable.is_visible(self) - Check if an entry is visible on site

related_published_set

Return only related entries published

Get Method:
unreachable.related_published_set(self) - Return only related entries published

discussions

Return published discussions

Get Method:
unreachable.discussions(self) - Return published discussions

comments

Return published comments

Get Method:
unreachable.comments(self) - Return published comments

pingbacks

Return published pingbacks

Get Method:
unreachable.pingbacks(self) - Return published pingbacks

trackbacks

Return published trackbacks

Get Method:
unreachable.trackbacks(self) - Return published trackbacks

short_url

Return the entry's short url

Get Method:
unreachable.short_url(self) - Return the entry's short url