rest paging
This commit is contained in:
@@ -40,6 +40,7 @@ INSTALLED_APPS = [
|
||||
|
||||
'rest_framework',
|
||||
'psycopg2',
|
||||
'corsheaders',
|
||||
|
||||
'core',
|
||||
'content',
|
||||
@@ -48,6 +49,9 @@ INSTALLED_APPS = [
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
@@ -131,3 +135,13 @@ STATIC_URL = 'static/'
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
CORS_ALLOWED_ORIGINS = [
|
||||
"http://localhost:5173",
|
||||
"http://127.0.0.1:5173",
|
||||
]
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'PAGE_SIZE': 10
|
||||
}
|
||||
@@ -20,5 +20,5 @@ from django.urls import path, include
|
||||
urlpatterns = [
|
||||
# path('admin/', admin.site.urls),
|
||||
|
||||
path('core/', include('core.urls')),
|
||||
path('core/', include('core.urls')),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user