1
# Copyright (C) 2010, 2011 Linaro Limited
3
# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
5
# This file is part of LAVA Server.
7
# LAVA Server is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU Affero General Public License version 3
9
# as published by the Free Software Foundation
11
# LAVA Server is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
16
# You should have received a copy of the GNU Affero General Public License
17
# along with LAVA Server. If not, see <http://www.gnu.org/licenses/>.
20
Headless model application experiment
23
from django.db import models
24
from django.utils.translation import ugettext as _
26
from django_restricted_resource.models import RestrictedResource
29
class Project(RestrictedResource):
31
Project is a container of everything else. Projects are restricted
32
resources and thus belong to a particular user or group and have a "public"
36
name = models.CharField(
40
verbose_name=_(u"Name"),
41
help_text=_(u"Arbitrary text, up to 100 characters"
42
u", can be changed later"))
44
is_aggregate = models.BooleanField(
47
verbose_name=_("Aggregate"),
48
help_text=_(u"When selected the project will be treated like a"
49
u" distribution. Some UI elements are optimized for that case"
50
u" and behave differently."))
52
def __unicode__(self):
56
def get_absolute_url(self):
57
return ('lava_data_store.views.project_detail', [self.pk])