Update Blog Settings
Updates the blog settings of the project
HTTP Request
PATCH/api/settings/blog
Authorization
Authorization
- Required: Yes
- Permission: Staff with BlogSettingsPermission or Admin
- Permission Code: 1042
- Authentication: Token authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| blog_truncated_excerpt_max_length | Integer | No | Maximum length for truncated excerpts (10-500) |
| blog_truncated_body_max_length | Integer | No | Maximum length for truncated body text (minimum: 50) |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Update blog settings
4response = requests.patch('http://www.example.com/api/settings/blog',
5 headers={'Authorization': 'Token <your_api_key>'},
6 json={
7 "blog_truncated_excerpt_max_length": 300,
8 "blog_truncated_body_max_length": 1500
9 }
10)
11print(response.json())1# Update blog settings
2curl "http://www.example.com/api/settings/blog" -H "Authorization: Token <your_api_key>" -X PATCH -d '{
3 "blog_truncated_excerpt_max_length": 300,
4 "blog_truncated_body_max_length": 1500
5}'Response Fields
| Field | Type | Description |
|---|---|---|
| blog_truncated_excerpt_max_length | Integer | Maximum length for truncated excerpts (10-500, default: 200) |
| blog_truncated_body_max_length | Integer | Maximum length for truncated body text (minimum: 50, default: 1000) |
Example Response
{
"blog_truncated_excerpt_max_length": 20,
"blog_truncated_body_max_length": 400
}
Notes
blog_truncated_excerpt_max_lengthshould be between10and500with the default value being200blog_truncated_body_max_lengthshould be larger that50with the default value being1000