Browse files

Try to find out what means the opaque statement in issue #74

  • Loading branch information...
1 parent 0e49731 commit f65a5d3dd2cb892890c66a0835b573b631ae9215 @jpic jpic committed Dec 5, 2012
Showing with 13 additions and 6 deletions.
  1. +1 −1 setup.py
  2. +6 −0 test_project/charfield_autocomplete/admin.py
  3. +6 −5 test_project/charfield_autocomplete/models.py
View
2 setup.py
@@ -60,7 +60,7 @@ def run(self):
setup(
name='django-autocomplete-light',
- version='1.1.3',
+ version='1.1.4',
description='Simple alternative to django-ajax-selects',
author='James Pic',
author_email='jamespic@gmail.com',
View
6 test_project/charfield_autocomplete/admin.py
@@ -4,8 +4,14 @@
from models import Taggable
+class TaggableInline(admin.TabularInline):
+ form = TaggableForm
+ model = Taggable
+
+
class TaggableAdmin(admin.ModelAdmin):
form = TaggableForm
list_display = ['name', 'tags']
+ inlines = [TaggableInline]
admin.site.register(Taggable, TaggableAdmin)
View
11 test_project/charfield_autocomplete/models.py
@@ -5,10 +5,11 @@
class Taggable(models.Model):
- name = models.CharField(max_length=50)
- tags = TagField(null=True, blank=True)
+ name = models.CharField(max_length=50)
+ tags = TagField(null=True, blank=True)
+ parent = models.ForeignKey('self', null=True, blank=True)
- def __unicode__(self):
- return self.name
+ def __unicode__(self):
+ return self.name
-tagging.register(Taggable, tag_descriptor_attr='etags')
+tagging.register(Taggable, tag_descriptor_attr='etags')

0 comments on commit f65a5d3

Please sign in to comment.