very basic plannedsession view view
This commit is contained in:
@@ -741,7 +741,7 @@ from utils import (
|
||||
geo_distance,serialize_list,deserialize_list,uniqify,
|
||||
str2bool,range_to_color_hex,absolute,myqueue,get_call,
|
||||
calculate_age,rankingdistances,rankingdurations,
|
||||
is_ranking_piece
|
||||
is_ranking_piece,my_dict_from_instance
|
||||
)
|
||||
|
||||
import datautils
|
||||
@@ -11801,3 +11801,24 @@ def plannedsession_edit_view(request,id=0):
|
||||
'plannedsessions':sps,
|
||||
'thesession':ps,
|
||||
})
|
||||
|
||||
def plannedsession_view(request,id=0):
|
||||
|
||||
r = getrower(request.user)
|
||||
|
||||
try:
|
||||
ps = PlannedSession.objects.get(id=id)
|
||||
except PlannedSession.DoesNotExist:
|
||||
raise Http404("Planned Session does not exist")
|
||||
|
||||
|
||||
psdict = {}
|
||||
|
||||
psdict = my_dict_from_instance(ps,PlannedSession)
|
||||
|
||||
return render(request,'plannedsessionview.html',
|
||||
{
|
||||
'psdict': psdict,
|
||||
'attrs':['name','startdate']
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user