link.config
Config()
Bases: BipObject
Server Config Bip object.
The server config should be created with link.specials.setup()
in order to get
the best default values.
Attributes:
Name | Type | Description |
---|---|---|
uid |
str
|
Bip unique identifier (uuid4). Edition is forbidden if this is an existing (recorded in database) entity. |
slug |
str
|
Human-readable unique identifier.
Since the Config is a singleton (only one per Bip instance), the slug is always |
bip_source |
str
|
Url to the Git repository of Bip. The repository must be public. Used for updates. Unless you want to use you own fork of Bip, you should be using the official repository url (https://git.blinkink.co.uk/bip/client.git) |
content_source |
str
|
Url to your Git repository for content. The repository must be public. |
version |
str
|
The version used for the Bip instance clients.
Must be |
enable_announcement |
bool
|
If |
announcement_message |
str
|
If |
announcement_uid |
str
|
Announcement unique identifier (uuid4). Useful for determining if an announcement has been seen by a user. This is automatically generated if the announcement has been modified. |
announcement_level |
str
|
If |
closable_announcement |
bool
|
If |
active_project_timeout |
int
|
In days, defines after how many days of inactivity the active project of a user is cleared (set to none). |
Source code in client/bip/link/config.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
is_announcement_modified
property
Tells if any announcement setting has been modified.
Returns:
Name | Type | Description |
---|---|---|
bool |
True if modified, False otherwise. |
clear_announcement()
Deletes the current announcement if any
Source code in client/bip/link/config.py
226 227 228 229 230 231 |
|
save()
Saves a Config
object.
If the object is not floating (exists in the database) and has not been modified, nothing will be done.
If floating, the uid is automatically generated.
If not specified, the unique slug is automatically generated from the name.
Raises:
Type | Description |
---|---|
ValueError
|
|
Source code in client/bip/link/config.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
|
get(force=False)
Gets the current Bip instance server config.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
autogen |
bool
|
If set to true, the getter automatically returns an empty Config |
required |
Returns:
Name | Type | Description |
---|---|---|
Config |
If found and/or if not found but |
|
bool |
If not found and |
Source code in client/bip/link/config.py
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
|