1
1
Fork 0
novelmetrix-python/ras/api/urls.py

32 lines
1.2 KiB
Python
Raw Permalink Normal View History

2023-02-15 16:00:58 +01:00
from django.urls import path, include
2023-03-29 08:04:42 +02:00
from django.views.decorators.csrf import csrf_exempt
2022-09-05 15:53:48 +02:00
from .views import *
2023-11-10 11:57:38 +01:00
from .modules.auth import *
from .modules.crud import *
2023-11-13 16:09:59 +01:00
from .modules.challenges import *
2023-11-10 11:57:38 +01:00
from .modules.pandas import *
2023-11-21 08:24:48 +01:00
from .modules.predictions import *
2022-09-05 15:53:48 +02:00
urlpatterns = [
2023-07-28 17:23:14 +02:00
path('books/all', getAllBooks),
2024-01-29 07:53:50 +01:00
path('books', getBooksByYear),
2022-10-03 17:03:02 +02:00
path('books/years', getYears),
2024-02-26 08:31:15 +01:00
path('books/en', countEnBooks),
2022-10-03 17:03:02 +02:00
path('books/stats', getStats),
2023-02-15 16:00:58 +01:00
path('books/insert', addBook),
path('books/delete', deleteBook),
path('books/update', updateBook),
2022-09-29 16:18:35 +02:00
path('books/genres', books_per_genre_per_month),
2022-09-30 16:30:18 +02:00
path('books/genres/count', countGenres),
2023-03-07 17:07:53 +01:00
path('books/ratings', avg_ratings_per_month),
2023-03-08 16:48:02 +01:00
path('books/ratings/count', countRatings),
2023-11-13 16:09:59 +01:00
# path('books/countries', books_per_country),
2023-03-29 08:04:42 +02:00
path('auth/login', csrf_exempt(login)),
2023-11-30 07:56:21 +01:00
path('auth/register', csrf_exempt(register)),
2023-11-13 16:09:59 +01:00
path('books/challenge', getChallengeOfYear),
path('books/challenges', getAllChallenges),
path('books/challenges/insert', addChallenge),
path('books/challenges/<int:id>/delete', deleteChallenge),
2023-11-21 08:24:48 +01:00
path('books/challenges/prediction/train', predict_next_year),
2022-09-05 15:53:48 +02:00
]