regularstuff / tildeblog

A learn-to-use Django team project
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

changes endpoint name #62

Closed Akhaled19 closed 5 months ago

Akhaled19 commented 6 months ago

This PR resolves issue #33

Changes endpoint names from de/<int:learnt_id> to /edit/<int:learnt_id> and de to add

regularstuff commented 6 months ago

The change given breaks the code that uses "til_de" and "til_edit_de" to tie back to the endpoints.

Can you update to:

    path("edit/<int:learnt_id>", views.learning_data_entry, name="til_de_id"),
    path("add", views.learning_data_entry, name="til_de"),

This way the logic that uses django's reverse-url functionality (e.g. the "edit" button when you show an entry) will use the new URLs (via the existing reverse url string)

Akhaled19 commented 6 months ago

Hello @regularstuff, thank you for the feedback.

I should have ensured that my new change wouldn't break any existing code, but I'm experiencing some difficulty running tildeblog locally