| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -84,6 +84,13 @@ Update a project:: | |||
| 84 | 84 | project.snippets_enabled = 1 | |
| 85 | 85 | project.save() | |
| 86 | 86 | ||
| 87 | + Set the avatar image for a project:: | ||
| 88 | + | ||
| 89 | + # the avatar image can be passed as data (content of the file) or as a file | ||
| 90 | + # object opened in binary mode | ||
| 91 | + project.avatar = open('path/to/file.png', 'rb') | ||
| 92 | + project.save() | ||
| 93 | + | ||
| 87 | 94 | Delete a project:: | |
| 88 | 95 | ||
| 89 | 96 | gl.projects.delete(project_id) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4463,6 +4463,7 @@ class ProjectManager(CRUDMixin, RESTManager): | |||
| 4463 | 4463 | "ci_config_path", | |
| 4464 | 4464 | ), | |
| 4465 | 4465 | ) | |
| 4466 | + _types = {"avatar": types.ImageAttribute} | ||
| 4466 | 4467 | _list_filters = ( | |
| 4467 | 4468 | "search", | |
| 4468 | 4469 | "owned", | |
| Back | FazBrowse Home | New Git URL |
0 commit comments