Commit 8174b6ea authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Progress II

parent 76f2307f
......@@ -508,6 +508,7 @@ def get_astakos_group_creation_form(request):
if commit:
g.save()
g.owner = [request.user]
g.approve_member(request.user)
return g
return AstakosGroupCreationForm
......
......@@ -7,7 +7,7 @@
<h2><span>NEW GROUP</span></h2>
{% include "im/form_render.html" %}
<div class="form-row submit">
<input type="submit" class="submit altcol" value="NEXT" />
<input type="submit" class="submit altcol" value="ADD POLICIES" />
</div>
</form>
</div>
......
......@@ -596,14 +596,12 @@ def group_add(request):
@signed_terms_required
@login_required
def user_group_list(request):
list = AstakosGroup.objects.filter(membership__person=request.user)
return object_list(request, queryset=list)
@signed_terms_required
@login_required
def owner_group_list(request):
list = AstakosGroup.objects.filter(owner__id=request.user.id)
def group_list(request):
relation = get_query(request).get('relation', 'member')
if relation == 'member':
list = AstakosGroup.objects.filter(membership__person=request.user)
else:
list = AstakosGroup.objects.filter(owner__id=request.user.id)
return object_list(request, queryset=list)
@signed_terms_required
......
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