예제 #1
0
 class Meta:
     model = get_project_model()
     fields = (
         "uuid",
         "name",
         "description",
         "tags",
         "created_at",
         "updated_at",
     )
예제 #2
0
 class Meta:
     model = get_project_model()
     fields = ("name", )
예제 #3
0
파일: register.py 프로젝트: zhaohb/polyaxon
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from django.contrib.admin import site
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin

from coredb.abstracts.getter import get_artifact_model, get_project_model, get_run_model
from coredb.administration.artifacts import ArtifactAdmin
from coredb.administration.projects import ProjectAdmin
from coredb.administration.runs import RunLightAdmin

site.register(get_user_model(), UserAdmin)
site.register(get_artifact_model(), ArtifactAdmin)
site.register(get_project_model(), ProjectAdmin)
site.register(get_run_model(), RunLightAdmin)
예제 #4
0
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from coredb.abstracts.getter import get_project_model
from coredb.queries.projects import PROJECT_DETAIL, PROJECT_LIST

project_model = get_project_model()

project_detail = project_model.objects.only(*PROJECT_DETAIL)
projects = project_model.all.only(*PROJECT_LIST)
예제 #5
0
파일: projects.py 프로젝트: zhaohb/polyaxon
 class Meta:
     model = get_project_model()