Compare commits
2 Commits
a4ce0b0c2a
...
56d57dc26a
| Author | SHA1 | Date | |
|---|---|---|---|
| 56d57dc26a | |||
| ee8d57f809 |
@ -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')),
|
||||
]
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
asgiref==3.8.1
|
||||
Django==5.1.7
|
||||
django-cors-headers==4.7.0
|
||||
djangorestframework==3.15.2
|
||||
psycopg2-binary==2.9.10
|
||||
sqlparse==0.5.3
|
||||
|
||||
Loading…
Reference in New Issue
Block a user