Mudanza de repo
This commit is contained in:
59
config/urls.py
Normal file
59
config/urls.py
Normal file
@@ -0,0 +1,59 @@
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include, re_path
|
||||
from django.conf import settings
|
||||
#
|
||||
from rest_framework import permissions
|
||||
from drf_yasg.views import get_schema_view
|
||||
from drf_yasg import openapi
|
||||
|
||||
from django.conf.urls.static import static
|
||||
|
||||
from rest_framework_simplejwt.views import (
|
||||
TokenObtainPairView,
|
||||
TokenRefreshView,
|
||||
)
|
||||
|
||||
schema_view = get_schema_view(
|
||||
openapi.Info(
|
||||
title="EFC API",
|
||||
default_version='v1',
|
||||
description="API para el sistema EFC V2 - Gestión de Expediente electronicos de Comercio Exterior",
|
||||
terms_of_service="https://www.google.com/policies/terms/",
|
||||
contact=openapi.Contact(email="contact@aduanasoft.com.mx"),
|
||||
license=openapi.License(name="MIT License"),
|
||||
),
|
||||
public=True,
|
||||
permission_classes=(permissions.AllowAny,),
|
||||
authentication_classes=[], # Desactivar auth para ver la documentación
|
||||
# url='https://api.efc-aduanasoft.com/api/v1'
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('api/v1/', include('api.licence.urls')),
|
||||
|
||||
# JWT Authentication
|
||||
path('api/v1/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
||||
path('api/v1/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
||||
path('api/v1/user/', include(('api.cuser.urls', 'cuser'), namespace='cuser')), # Custom user app
|
||||
|
||||
#path('api-auth/', include('rest_framework.urls')),
|
||||
path('api/v1/swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
||||
path('api/v1/redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
||||
|
||||
path('api/v1/customs/', include('api.customs.urls')),
|
||||
path('api/v1/organization/', include('api.organization.urls')),
|
||||
path('api/v1/record/', include('api.record.urls')),
|
||||
path('api/v1/datastage/', include('api.datastage.urls')),
|
||||
path('api/v1/vucem/', include('api.vucem.urls')),
|
||||
path('api/v1/logger/', include('api.logger.urls')), # Logger app
|
||||
path('api/v1/notificaciones/', include('api.notificaciones.urls')), # Notificaciones app
|
||||
path('api/v1/cards/', include('api.cards.urls')), # Cards app
|
||||
path('api/v1/reports/', include('api.reports.urls')), # Reports app
|
||||
]
|
||||
# En producción, los archivos media son servidos por Nginx
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(settings.MEDIA_URL + 'profile_pictures/', document_root=settings.MEDIA_ROOT / 'profile_pictures')
|
||||
urlpatterns += static(settings.MEDIA_URL + 'membretado/', document_root=settings.MEDIA_ROOT / 'profile_pictures')
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
|
||||
Reference in New Issue
Block a user