anschelburk / simple_planner

Apache License 2.0
0 stars 0 forks source link

Code Review #1: Updating Calendar Events #13

Closed anschelburk closed 4 months ago

anschelburk commented 4 months ago

Got my code up on GitHub! I followed the steps in Issue #12, but it still isn't working. This may be in part because the modal is no longer closing when a user clicks "Save." I'm not sure what I'm doing wrong. Do you have any suggestions? Appreciate it.

bbelderbos commented 4 months ago

Did you check the runserver log?

When I make an edit to the title of an event I see this:

Not Found: /api/updat_event
Not Found: /api/update_event/
[06/Jun/2024 15:37:09] "GET /api/updat_event HTTP/1.1" 404 2845
[06/Jun/2024 15:37:09] "PUT /api/update_event/ HTTP/1.1" 404 2851
bbelderbos commented 4 months ago

This seems off?

    path('api/update_event', views.create_event, name='update_event'),
bbelderbos commented 4 months ago

I use the Silver Searcher for finding patterns fast, so based on the error, seems you have a typo here:

$ ag updat_event
planner/templates/calendar_modal_structure.html
30:                <button type="button" hx-get="/api/updat_event" hx-target="#calendar" class="btn btn-primary" id="saveEventChanges">Save changes</button>
bbelderbos commented 4 months ago

@anschelburk this will help: https://github.com/anschelburk/simpleplanner/pull/14

Please merge my changes there, then pull your branch and keep going 📈

bbelderbos commented 4 months ago

I use the Silver Searcher for finding patterns fast, so based on the error, seems you have a typo here:

$ ag updat_event
planner/templates/calendar_modal_structure.html
30:                <button type="button" hx-get="/api/updat_event" hx-target="#calendar" class="btn btn-primary" id="saveEventChanges">Save changes</button>

I installed ripgrep actually today, slightly faster even (and in rust < so you'll need to have rust installed): cargo install ripgrep