Commit eb3975a8 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

dependencies: mandatory & select2

parent 16260efa
Pipeline #3813 passed with stage
in 39 seconds
......@@ -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)
# 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),
),
]
......@@ -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'
......
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