Wikipedia Clone - Create Page Working (Django POST)

Опубликовано: 31 Май 2026
на канале: Shawn Logan Angelo Lapuz
5
0

In this update, the **Wiki project index page is fully functional**! We successfully implemented `util.list_entries()` and connected it to the `views.index` function. The `index.html` template now properly renders and displays all available entries.

✅ *What’s Working Now:*

Entries are displayed correctly on the index page
Verified entries include: Python, Django, HTML, CSS, and Git
Entries are successfully saved and appear in the index

This confirms that both the *Django backend* and *template rendering system* are working as expected. The app can now also handle user input and persist data.

---
What You Just Learned (Key Concepts):

Handling POST requests
`if request.method == "POST"`
Processing form data
`request.POST.get()`
Saving data on the server
`util.save_entry()`
Redirecting after submission
`redirect("entry", title=title)`
CSRF protection in Django
`{% csrf_token %}`

#CS50W #Django #Python #WebDevelopment #LearnToCode