-
Notifications
You must be signed in to change notification settings - Fork 80
Schedule publishing #1369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev_v4
Are you sure you want to change the base?
Schedule publishing #1369
Conversation
- Introduced field in Video model. - Updated VideoForm to handle scheduled publish date input. - Implemented Celery task to publish videos based on the scheduled date.
| change_transcript(); | ||
| } | ||
|
|
||
| document.addEventListener("DOMContentLoaded", function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ajouter un petit jsdoc
| self.fields = add_describedby_attr(self.fields) | ||
| self.fields['scheduled_publish_date'].widget.input_type = 'datetime-local' | ||
| self.fields['scheduled_publish_date'].widget.attrs['placeholder'] = 'AAAA-MM-JJTHH:MM' | ||
| self.fields['scheduled_publish_date'].help_text = _('Format attendu : AAAA-MM-JJTHH:MM (ex : 2025-06-11T14:30)') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
à mettre en anglais par défaut.
| ) | ||
| scheduled_publish_date = models.DateTimeField( | ||
| null=True, blank=True, | ||
| help_text="Date and hour of the scheduled publication." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
à traduire
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
est-ce que ce fichier binaire peut être créé automatiquement s'il est manquant ?
Si oui, ne pas l'inclure dans le git
This PR introduce the ability to schedule the publication of a video at a specific date and time.
In the video edit form, a new checkbox "Schedule the post" allows you to enable scheduling.
If checked, a "Scheduled publish date" field appears, allowing you to select the date and time when the video should be published.
A periodic Celery task will automatically publish videos at their scheduled date and time.
Celery setup:
To enable scheduled publishing, you must run both a Celery worker and a Celery beat scheduler in your terminal:
Worker:
celery -A pod.main worker -l info
Beat:
celery -A pod.main beat -l info
Before sending your pull request, make sure the following are done
dev_v4branch.draftif it’s still a work in progress.