Ejemplo n.º 1
0
from django.urls import path, include

from coffeechain.common.rest_api.views import block_data_view
from coffeechain.proto.coffee_pb2 import Code
from .api import views

urlpatterns = [
    path("mint/", views.MintCodes.as_view(), name="mint-codes"),
    path("activate/", views.ActivateCodesView.as_view(),
         name="activate-codes"),
    path(
        "<slug:key>/",
        include([
            path("", views.GetCode.as_view(), name="get-code"),
            path("block-data/", block_data_view(Code)),
        ]))
]
Ejemplo n.º 2
0
from django.urls import path, include

from coffeechain.apps.shipment.api import views
from coffeechain.common.rest_api.views import block_data_view
from coffeechain.proto.coffee_pb2 import Shipment

urlpatterns = [
    path("create/", views.ShipmentCreateView.as_view()),
    path(
        "<slug:key>/",
        include([
            path("", views.ShipmentGetView.as_view()),
            path("block-data/", block_data_view(Shipment)),
        ]))
]
Ejemplo n.º 3
0
from django.urls import include, path

from coffeechain.apps.roast.api import views
from coffeechain.common.rest_api.views import block_data_view
from coffeechain.proto.coffee_pb2 import Roast

urlpatterns = [
    path("create/", views.RoastCreateView.as_view()),
    path(
        "<slug:key>/",
        include([
            path("", views.RoastGetView.as_view()),
            path("add-harvest/", views.RoastAddHarvestView.as_view()),
            path("block-data/", block_data_view(Roast))
        ]))
]
Ejemplo n.º 4
0
from django.urls import path, include

from coffeechain.apps.harvest.api import views
from coffeechain.common.rest_api.views import block_data_view
from coffeechain.proto.coffee_pb2 import Harvest

urlpatterns = [
    path("create/", views.HarvestCreateView.as_view()),
    path(
        "<slug:key>/",
        include([
            path("", views.HarvestGetView.as_view()),
            path("add-shipment/", views.HarvestAddShipmentView.as_view()),
            path("add-farm/", views.HarvestAddFarmView.as_view()),
            path("block-data/", block_data_view(Harvest)),
        ]))
]
Ejemplo n.º 5
0
from django.urls import path, include

from coffeechain.apps.farm.api import views
from coffeechain.common.rest_api.views import block_data_view
from coffeechain.proto.coffee_pb2 import Farm

urlpatterns = [
    path("create/", views.CreateFarmView.as_view()),
    path(
        "<slug:key>/",
        include([
            path("", views.FarmGetView.as_view()),
            path("add-cert/", views.AddCertView.as_view()),
            path("block-data/", block_data_view(Farm)),
        ]))
]