Open readytheory opened 4 months ago
Hello @readytheory! If I understand correctly, you're requesting the following paths to be changed to this format, correct?
urlpatterns = [
...
path("edit/<int:learnt_id>", views.learning_data_entry, name="til_edit_id"),
path("add", views.learning_data_entry, name="til_add"),
]
@Akhaled19 Yes, that sounds like that sums it up. Would you like to create a pull request for that?
@readytheory great! I'll go ahead and make a pr
I missed it when you asked before, but the "name" attribute should not change, unless the places in the code that use the names "til_edit_de" and "til_de" also change. I put a comment on PR, let me know if unclear.
If you run the site on your local, you'll see the "reverse match" failures when submitting/following links with the proposed change.
Since merge of issue #20, create and update share logic. Even though they use same logic, we should have one endpoint /add and one /edit/123 (to edit item 123)