Skip to content

Commit

Permalink
Removing extra admin command
Browse files Browse the repository at this point in the history
  • Loading branch information
sandstromviktor committed Mar 6, 2024
1 parent 9c5cb8e commit 2041885
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions projects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,12 @@
class ProjectAdmin(admin.ModelAdmin):
list_display = ("name", "owner", "status", "updated_at", "project_template")
list_filter = ["owner", "status", "project_template"]
actions = ["update_app_limits", "update_project_template"]
actions = ["update_app_limits"]

@admin.action(description="Reset app limits")
def update_app_limits(self, request, queryset):
queryset.update(apps_per_project=settings.APPS_PER_PROJECT_LIMIT)

# 2024-02-16 - This was added as a temporary method to simplify adding a project template to a project
# Should be removed if all projects have a linked template.
@admin.action(description="Change project template to default")
def update_project_template(self, request, queryset):
project_template = ProjectTemplate.objects.get(slug="blank")
queryset.update(project_template=project_template)


@admin.register(Flavor)
class FlavorAdmin(admin.ModelAdmin):
Expand Down

0 comments on commit 2041885

Please sign in to comment.