Yon lot piblikasyon pou teste platfom nan

  1. Make sure to handle the form submission in a view. In the view, you can retrieve the selected categories from the form data and add them to the post object using the add() method of the ManyToManyField.

  2. Ensure that your form's action attribute points to the URL where the view for creating the post is located. In this example, the URL is assumed to be named 'create_post'. Adjust this according to your project's URL configuration.

With this setup, users will be able to select categories for their posts from the form in your template, and those categories will be saved along with the post data in the database.

  1.  

Atik similè

Kòmantè (2)

Author Avatar
FredJ

this is a comment with Hans

Author Avatar
FredJ

Yon komante sou telephone