Commit 2f1e7e6f authored by root's avatar root
Browse files

commit dev84 changes

parent 6213086b
......@@ -596,8 +596,11 @@ class AstakosGroupSearchForm(forms.Form):
q = forms.CharField(max_length=200, label='Search group')
class TimelineForm(forms.Form):
entity = forms.CharField(
widget=forms.HiddenInput(), label='')
# entity = forms.CharField(
# widget=forms.HiddenInput(), label='')
entity = forms.ModelChoiceField(
queryset=AstakosUser.objects.filter(is_active = True)
)
resource = forms.ModelChoiceField(
queryset=Resource.objects.all()
)
......@@ -619,6 +622,8 @@ class TimelineForm(forms.Form):
d['start_date'] = d['start_date'].strftime("%Y-%m-%dT%H:%M:%S.%f")[:24]
if 'end_date' in d:
d['end_date'] = d['end_date'].strftime("%Y-%m-%dT%H:%M:%S.%f")[:24]
if 'entity' in d:
d['entity'] = d['entity'].email
return d
class AstakosGroupSortForm(forms.Form):
......
......@@ -752,8 +752,8 @@ def group_list(request):
d['own'].append(g)
else:
d['other'].append(g)
d.set_default('own', [])
d.set_default('other', [])
d.setdefault('own', [])
d.setdefault('other', [])
for k, l in d.iteritems():
page = request.GET.get('%s_page' % k, 1)
sorting = globals()['%s_sorting' % k] = request.GET.get('%s_sorting' % k)
......@@ -1100,10 +1100,11 @@ def clear_billing_data(data):
@signed_terms_required
@login_required
def timeline(request):
data = {'entity':request.user.email}
# data = {'entity':request.user.email}
timeline_body = ()
timeline_header = ()
form = TimelineForm(data)
# form = TimelineForm(data)
form = TimelineForm()
if request.method == 'POST':
data = request.POST
form = TimelineForm(data)
......@@ -1122,4 +1123,3 @@ def timeline(request):
form=form,
timeline_header=timeline_header,
timeline_body=timeline_body)
l=l)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment