cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
src.clm.models.news.News Class Reference

NEWS Model. More...

Classes

class  Meta

Public Member Functions

def __unicode__
def dict

Static Public Member Functions

def get

Static Public Attributes

tuple content = models.TextField()
 News content.
tuple date = models.DateTimeField()
 this News' publication date
tuple sticky = models.IntegerField()
 whether this News is sticky and should be displayed for a longer time
tuple topic = models.CharField(max_length=255)
 News topic.

Detailed Description

NEWS Model.

News is an entity for providing latest common News, targeted to all users, available on the main page of the CC1 webinterface.

Definition at line 38 of file news.py.

Member Function Documentation

def src.clm.models.news.News.__unicode__ (   self)
Returns
(string) this News topic

Definition at line 55 of file news.py.

def src.clm.models.news.News.dict (   self)
Returns
(dict) this New's data
fields:
  • news_id (int) id of this News
  • topic (string) topic of this News
  • content (string) content of this News
  • sticky (bool) whether this News is sticky and should be keept displayed for longer period
  • date (datetime.datetime) creation date of this News

Definition at line 70 of file news.py.

def src.clm.models.news.News.get (   news_id)
static
Parameters
news_id(int) id of the requested News
Returns
(News) instance of the requested News
Exceptions
CLMException('news_get')no such News found

Definition at line 88 of file news.py.

Member Data Documentation

tuple src.clm.models.news.News.content = models.TextField()
static

News content.

Note
each instance of the model has corresponding non-static attribute

Definition at line 42 of file news.py.

tuple src.clm.models.news.News.date = models.DateTimeField()
static

this News' publication date

Note
each instance of the model has corresponding non-static attribute

Definition at line 46 of file news.py.

tuple src.clm.models.news.News.sticky = models.IntegerField()
static

whether this News is sticky and should be displayed for a longer time

Note
each instance of the model has corresponding non-static attribute

Definition at line 44 of file news.py.

tuple src.clm.models.news.News.topic = models.CharField(max_length=255)
static

News topic.

Note
each instance of the model has corresponding non-static attribute

Definition at line 40 of file news.py.


The documentation for this class was generated from the following file: