Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
eb3975a8
Commit
eb3975a8
authored
Mar 23, 2019
by
Guilhem Saurel
Browse files
dependencies: mandatory & select2
parent
16260efa
Pipeline
#3813
passed with stage
in 39 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/admin.py
View file @
eb3975a8
...
...
@@ -8,12 +8,21 @@ class ContributorAdmin(ModelAdmin):
return
super
().
get_queryset
(
request
).
gepettist
().
distinct
()
class
DependencyAdmin
(
ModelAdmin
):
autocomplete_fields
=
(
'project'
,
'library'
)
class
ProjectAdmin
(
ModelAdmin
):
search_fields
=
(
'name'
,
'slug'
)
site
.
register
(
models
.
Contributor
,
ContributorAdmin
)
site
.
register
(
models
.
Project
,
ProjectAdmin
)
site
.
register
(
models
.
Dependency
,
DependencyAdmin
)
for
model
in
[
models
.
License
,
models
.
Forge
,
models
.
Namespace
,
models
.
Project
,
models
.
Repo
,
models
.
Branch
,
models
.
Robotpkg
,
...
...
@@ -22,6 +31,5 @@ for model in [
models
.
Target
,
models
.
ContributorName
,
models
.
ContributorMail
,
models
.
Dependency
,
]:
site
.
register
(
model
)
rainboard/migrations/0034_dependency_mandatory.py
0 → 100644
View file @
eb3975a8
# Generated by Django 2.1.7 on 2019-03-23 10:07
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'rainboard'
,
'0033_project_allow_format_failure'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'dependency'
,
name
=
'mandatory'
,
field
=
models
.
BooleanField
(
default
=
True
),
),
]
rainboard/models.py
View file @
eb3975a8
...
...
@@ -4,9 +4,8 @@ import re
import
time
from
subprocess
import
check_output
import
requests
import
git
import
requests
from
autoslug
import
AutoSlugField
from
django.conf
import
settings
from
django.core.mail
import
mail_admins
...
...
@@ -957,6 +956,7 @@ class Dependency(models.Model):
robotpkg
=
models
.
BooleanField
(
default
=
False
)
# TODO NYI
cmake
=
models
.
BooleanField
(
default
=
False
)
ros
=
models
.
BooleanField
(
default
=
False
)
mandatory
=
models
.
BooleanField
(
default
=
True
)
class
Meta
:
verbose_name_plural
=
'dependencies'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment