brewery-website/yeast/urls.py

22 lines
959 B
Python

from django.urls import include, path
from django.contrib.auth.decorators import login_required
from django.contrib import admin
from yeast.views import YeastListView, BatchListView, home, sample, batch, batch_labels, addBatch, addStrain, get_batch, NewPropogation
# app_name = 'yeast'
urlpatterns = [
path('samples/<int:yeast_id>/', sample, name='yeast'),
path('samples/', YeastListView.as_view(), name='yeasts'),
path('batches/addbatch/', login_required(addBatch.as_view()), name='addbatch'),
path('batches/addstrain/', login_required(addStrain.as_view()), name='addstrain'),
path('batches/<int:batch_id>/', batch, name='batch'),
path('batches/', BatchListView.as_view(), name='batches'),
path('batch_lookup/', get_batch, name='get_batch'),
path('batch_labels/<int:batch_id>/', login_required(batch_labels), name='labels'),
path('progation/add/', NewPropogation, name='propogate'),
path('', home, name='home'),
]