Documentation things.
This commit is contained in:
parent
3717c2b844
commit
0d0f5e2373
@ -51,6 +51,7 @@ MIDDLEWARE = [
|
|||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
|
'django.contrib.admindocs.middleware.XViewMiddleware',
|
||||||
# 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
# 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
||||||
# "django.contrib.flatpages.middleware.FlatpageFallbackMiddleware",
|
# "django.contrib.flatpages.middleware.FlatpageFallbackMiddleware",
|
||||||
# 'django.contrib.messages.middleware.MessageMiddleware',
|
# 'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
|
@ -28,11 +28,26 @@ def home(request):
|
|||||||
return render(request, 'yeast/home.html',{})
|
return render(request, 'yeast/home.html',{})
|
||||||
|
|
||||||
def batch(request, batch_id):
|
def batch(request, batch_id):
|
||||||
|
"""
|
||||||
|
Display a batch of yeast samples.
|
||||||
|
|
||||||
|
``Batch``
|
||||||
|
An instance of :model:`yeast.Batch`.
|
||||||
|
|
||||||
|
``Template``
|
||||||
|
:template:`yeast/batch.html`
|
||||||
|
"""
|
||||||
batch = get_object_or_404(Batch, pk=batch_id)
|
batch = get_object_or_404(Batch, pk=batch_id)
|
||||||
return render(request, 'yeast/batch.html', {'batch': batch})
|
return render(request, 'yeast/batch.html', {'batch': batch})
|
||||||
|
|
||||||
def batch_labels(request, batch_id):
|
def batch_labels(request, batch_id):
|
||||||
""" Create label PDF for samples in a batch
|
"""
|
||||||
|
Create label PDF for samples in a batch.
|
||||||
|
|
||||||
|
**Context**
|
||||||
|
|
||||||
|
``Batch``
|
||||||
|
An instance of :model:`yeast.Batch`.
|
||||||
"""
|
"""
|
||||||
skip_count = request.POST.get("skip_count", "")
|
skip_count = request.POST.get("skip_count", "")
|
||||||
samples = request.POST.getlist("samples", "")
|
samples = request.POST.getlist("samples", "")
|
||||||
|
Loading…
Reference in New Issue
Block a user