Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
django-taggit
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
826850c5
authored
Sep 09, 2011
by
gw0
Committed by
Florian Apolloner
Mar 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ordering of tags by their name, displaying and prepopulating slug fields in Django admin.
parent
983f0833
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
taggit/admin.py
+4
-1
No files found.
taggit/admin.py
View file @
826850c5
...
@@ -7,10 +7,13 @@ class TaggedItemInline(admin.StackedInline):
...
@@ -7,10 +7,13 @@ class TaggedItemInline(admin.StackedInline):
model
=
TaggedItem
model
=
TaggedItem
class
TagAdmin
(
admin
.
ModelAdmin
):
class
TagAdmin
(
admin
.
ModelAdmin
):
list_display
=
[
"name"
]
inlines
=
[
inlines
=
[
TaggedItemInline
TaggedItemInline
]
]
list_display
=
[
"name"
,
"slug"
]
ordering
=
[
"name"
,
"slug"
]
search_fields
=
[
"name"
]
prepopulated_fields
=
{
"slug"
:
[
"name"
]}
admin
.
site
.
register
(
Tag
,
TagAdmin
)
admin
.
site
.
register
(
Tag
,
TagAdmin
)
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