Sankofa Journal Step 8: Writing Posts

Add a form for creating and editing posts. List the fields explicitly and leave author out entirely: it must come from request.user in the view, never from the submission. Handle GET and POST in one view, redirect after a successful save, and re-render with the same form object when it is invalid. Then render the form field by field with real labels and per-field errors. Finally, test the failure path properly: submit it empty, submit it with a two-character title, and confirm that what you typed is still there afterwards.

SANKOFA SANDBOX
loading editor…
Your turn → Work through it step by step. This is a piece of the course project, not a throwaway exercise.

Built it in both languages?

Mark it done once your Python and JavaScript versions both run correctly. Honesty here is what makes the dashboard useful to you.

← BackNext: Module 9: Authentication and Sessions →