Skip to content

Commit

Permalink
Getting the admin interface working
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey Oordt committed Aug 27, 2009
1 parent 603352c commit 01c6cf3
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 582 deletions.
4 changes: 2 additions & 2 deletions categories/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django import forms
from django.template.defaultfilters import slugify
from mptt.forms import TreeNodeChoiceField
from editor import TreeEditorMixin
from editor.tree_editor import TreeEditor

class NullTreeNodeChoiceField(forms.ModelChoiceField):
"""A ModelChoiceField for tree nodes."""
Expand Down Expand Up @@ -57,7 +57,7 @@ def clean(self):
return self.cleaned_data


class CategoryAdmin(TreeEditorMixin, admin.ModelAdmin):
class CategoryAdmin(TreeEditor, admin.ModelAdmin):
form=CategoryAdminForm
list_display = ('__unicode__',)
search_fields = (('name',))
Expand Down
2 changes: 1 addition & 1 deletion categories/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_absolute_url(self):
class Meta:
verbose_name_plural = 'categories'
unique_together = ('parent', 'name')
ordering = ('name',)
ordering = ('tree_id','lft')

def __unicode__(self):
ancestors = self.get_ancestors()
Expand Down
8 changes: 0 additions & 8 deletions categories/templates/admin/editor/_messages.html

This file was deleted.

1 change: 0 additions & 1 deletion categories/templates/admin/editor/box.html

This file was deleted.

57 changes: 0 additions & 57 deletions categories/templates/admin/editor/editor.html

This file was deleted.

12 changes: 0 additions & 12 deletions categories/templates/admin/editor/editor_done.html

This file was deleted.

252 changes: 0 additions & 252 deletions categories/templates/admin/editor/item_editor.html

This file was deleted.

0 comments on commit 01c6cf3

Please sign in to comment.