Skip to content

Commit

Permalink
Merge pull request #31 from adinhodovic/add-read-only-fields
Browse files Browse the repository at this point in the history
feat: Add read only fields to admin
  • Loading branch information
adinhodovic committed Mar 5, 2024
2 parents a487739 + 39ded88 commit 97fe6eb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Dani Hodovic
Copyright (c) 2024 Adin Hodovic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

10 changes: 10 additions & 0 deletions django_admin_shellx/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@

@admin.register(TerminalCommand)
class TerminalCommandAdmin(admin.ModelAdmin):
readonly_fields = ("created", "modified")
list_display = ("command", "created_by", "execution_count")
fields = (
"created",
"modified",
"prompt",
"command",
"created_by",
"execution_count",
"favorite",
)

def get_urls(self):

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "django-admin-shellx"
version = "0.2.7"
version = "0.3.0"
description = "A Django Admin Shell"
authors = ["Adin Hodovic <hodovicadin@gmail.com>"]
license = "MIT"
Expand Down

0 comments on commit 97fe6eb

Please sign in to comment.