Task #3520: Add is_looking_for_people field to project model
parent
806821469b
commit
5b2430ad69
|
@ -66,9 +66,12 @@ class MembershipInline(admin.TabularInline):
|
||||||
|
|
||||||
|
|
||||||
class ProjectAdmin(admin.ModelAdmin):
|
class ProjectAdmin(admin.ModelAdmin):
|
||||||
list_display = ["id", "name", "slug", "is_private", "is_featured", "owner", "created_date"]
|
list_display = ["id", "name", "slug", "is_private",
|
||||||
|
"is_featured", "is_looking_for_people",
|
||||||
|
"owner", "created_date"]
|
||||||
|
|
||||||
list_display_links = ["id", "name", "slug"]
|
list_display_links = ["id", "name", "slug"]
|
||||||
list_filter = ("is_private", "is_featured")
|
list_filter = ("is_private", "is_featured", "is_looking_for_people")
|
||||||
list_editable = ["is_featured"]
|
list_editable = ["is_featured"]
|
||||||
search_fields = ["id", "name", "slug", "owner__username", "owner__email", "owner__full_name"]
|
search_fields = ["id", "name", "slug", "owner__username", "owner__email", "owner__full_name"]
|
||||||
inlines = [RoleInline, MembershipInline, MilestoneInline, NotifyPolicyInline, LikeInline]
|
inlines = [RoleInline, MembershipInline, MilestoneInline, NotifyPolicyInline, LikeInline]
|
||||||
|
|
|
@ -464,7 +464,7 @@ class Command(BaseCommand):
|
||||||
total_milestones=self.sd.int(5,10),
|
total_milestones=self.sd.int(5,10),
|
||||||
tags=self.sd.words(1, 10).split(" "),
|
tags=self.sd.words(1, 10).split(" "),
|
||||||
is_looking_for_people=counter in LOOKING_FOR_PEOPLE_PROJECTS_POSITIONS,
|
is_looking_for_people=counter in LOOKING_FOR_PEOPLE_PROJECTS_POSITIONS,
|
||||||
is_featured=cointer in FEATURED_PROJECTS_POSITIONS)
|
is_featured=counter in FEATURED_PROJECTS_POSITIONS)
|
||||||
|
|
||||||
project.is_kanban_activated = True
|
project.is_kanban_activated = True
|
||||||
project.save()
|
project.save()
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('projects', '0028_project_is_featured'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='project',
|
||||||
|
name='is_looking_for_people',
|
||||||
|
field=models.BooleanField(verbose_name='is looking for people', default=False),
|
||||||
|
),
|
||||||
|
]
|
|
@ -184,6 +184,9 @@ class Project(ProjectDefaults, TaggedMixin, models.Model):
|
||||||
is_featured = models.BooleanField(default=False, null=False, blank=True,
|
is_featured = models.BooleanField(default=False, null=False, blank=True,
|
||||||
verbose_name=_("is featured"))
|
verbose_name=_("is featured"))
|
||||||
|
|
||||||
|
is_looking_for_people = models.BooleanField(default=False, null=False, blank=True,
|
||||||
|
verbose_name=_("is looking for people"))
|
||||||
|
|
||||||
userstories_csv_uuid = models.CharField(max_length=32, editable=False,
|
userstories_csv_uuid = models.CharField(max_length=32, editable=False,
|
||||||
null=True, blank=True,
|
null=True, blank=True,
|
||||||
default=None, db_index=True)
|
default=None, db_index=True)
|
||||||
|
|
Loading…
Reference in New Issue