urls.py 777 B

123456789101112131415161718192021222324252627
  1. from django.contrib import admin
  2. from django.urls import path, include
  3. from graphene_django.views import GraphQLView
  4. from django.views.decorators.csrf import csrf_exempt
  5. from django.conf.urls.static import static
  6. from django.conf import settings
  7. from .schema import schema
  8. from goods.views import image_upsert
  9. urlpatterns = [
  10. path('api/', include('goods.urls')),
  11. path('api/', include('orders.urls')),
  12. path('api/', include('categories.urls')),
  13. path('api/upload/',image_upsert),
  14. path('api/auth/',include('authAPI.urls')),
  15. path('api/admin/', admin.site.urls),
  16. path('api/graphql/',csrf_exempt(GraphQLView.as_view(
  17. graphiql=True,
  18. schema = schema
  19. )))
  20. ]
  21. urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)