Posts Services¶
- class services.posts.media.PostMediaService[source]¶
Bases:
objectPost Media Service
- classmethod create(post: Post, media_list: List)[source]¶
Method for create media :param post: Post object :param media_list: List of image and video
- classmethod set_formatted_path(post_media: PostMedia, upload_video_path: str, upload_preview_path: str) PostMedia[source]¶
Set proccessed video and preview from Video service :param post_media: PostMedia instance :param upload_video_path: Path to formatted video :param upload_preview_path: Path to preview
- exception services.posts.exceptions.AlreadyAddedToFavoritesException[source]¶
Bases:
ExceptionPost already added to favorites by user
- exception services.posts.exceptions.AlreadyLikedPostException[source]¶
Bases:
ExceptionPost already liked by user
- exception services.posts.exceptions.CategoriesDontExistException[source]¶
Bases:
ExceptionSelected categories for post are don’t exist or unavailable
- exception services.posts.exceptions.CommentLimitImageException[source]¶
Bases:
ExceptionComment has limit on images
Bases:
ExceptionSelected categories for post are don’t exist or unavailable
- exception services.posts.exceptions.TooManyCategoriesException[source]¶
Bases:
ExceptionPost contains more categories than allowed by the limits.
- exception services.posts.exceptions.TooManyLinkedMediaException[source]¶
Bases:
ExceptionPost contains more media than allowed by the limits.
- exception services.posts.exceptions.UserNotHasThisPostInFavoritesException[source]¶
Bases:
ExceptionUser not doesn’t have this post in favorites list
- exception services.posts.exceptions.UserNotLikeThisPostException[source]¶
Bases:
ExceptionUser not Like this post
- class services.posts.comment_image.CommentImageService[source]¶
Bases:
object- classmethod create(data) CommentImage[source]¶
- classmethod remove(instance: CommentImage) None[source]¶
- class services.posts.comment.CommentService[source]¶
Bases:
object- classmethod add_image(comment: Comment, image) CommentImage[source]¶
- comment_image_service¶
alias of
CommentImageService
- notification_service¶
alias of
NotificationService