Skip to content

Commit

Permalink
v0.5.1: bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SIMORRE Eric committed Feb 15, 2024
1 parent 5c45976 commit 8b4ef01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions django_year_calendar/templates/django_year_calendar/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
}
data = data.replace(/&$/, "/")
}
data += e.startDate.getTime()/1000 + '/'+ e.endDate.getTime()/1000
var reqdata = "{% url 'calendar_view_name' %}select" + data ;
reqdata += e.startDate.getTime()/1000 + '/'+ e.endDate.getTime()/1000;
console.log(reqdata);

const req = new Request('select' + data);
const req = new Request(reqdata);
fetch(req)
.then(response => response.text())
.then(result => {
Expand Down
4 changes: 2 additions & 2 deletions django_year_calendar/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .views import CalendarView, SelectionView

urlpatterns = [
path('', CalendarView.as_view()),
path('select/<int:start>/<int:end>', SelectionView.as_view(template_name='django_year_calendar/select_add.html')),
path('', CalendarView.as_view(), name='calendar_view_name'),
path('select/<int:start>/<int:end>', SelectionView.as_view(template_name='django_year_calendar/select_add.html')),
path('select/<req>/<int:start>/<int:end>', SelectionView.as_view()),
]

0 comments on commit 8b4ef01

Please sign in to comment.