News¶
Todo
Docstrings (module, models)
Models¶
-
class
indico.modules.news.models.news.NewsItem(**kwargs)¶ Bases:
sqlalchemy.orm.decl_api.ModelA simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
anchor¶
-
content¶
-
created_dt¶
-
id¶
-
locator¶ Define a smart locator property.
This behaves pretty much like a normal read-only property and the decorated function should return a dict containing the necessary data to build a URL for the object.
This decorator should usually be applied to a method named
locatoras this name is required for get_locator to find it automatically when just passing the object.If you need more than one locator, you can define it like this:
@locator_property def locator(self): return {...} @locator.other def locator(self): return {...}
The
otherlocator can then be accessed by passingobj.locator.otherto the code expecting an object with a locator.
-
slug¶
-
title¶
-
url¶
-