@permission_required("core.manage_shop")
def manage_property_groups(request):
    """The main view to manage properties.
    """
    try:
        prop = PropertyGroup.objects.all()[0]
        url = reverse("lfs_manage_property_group", kwargs={"id": prop.id})
    except __HOLE__:
        url = reverse("lfs_manage_no_property_groups")

    return HttpResponseRedirect(url)
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/property_groups/views.py/manage_property_groups