goh
This commit is contained in:
parent
1114d47a41
commit
df8415e718
|
@ -1,6 +1,6 @@
|
|||
from django.contrib.gis import admin
|
||||
from models import *
|
||||
from forms import RelationFormSet
|
||||
from forms import BaseRelationsFormSet
|
||||
from django import forms
|
||||
#from django.contrib.admin import SimpleListFilter
|
||||
from ajax_select.fields import AutoCompleteSelectMultipleField, AutoCompleteSelectField
|
||||
|
@ -86,7 +86,7 @@ class FeatureRelationInline(admin.TabularInline):
|
|||
model = Feature.relationships.through
|
||||
extra = 1
|
||||
fk_name = 'feature1'
|
||||
formset = RelationFormSet
|
||||
formset = BaseRelationsFormSet
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -13,4 +13,4 @@ class BaseRelationsFormSet(BaseModelFormSet):
|
|||
form.fields["feature2"] = AutoCompleteSelectField('feature', required=False)
|
||||
|
||||
# pass in the base formset class to the factory
|
||||
RelationFormSet = modelformset_factory(Relationship,fields=('feature2','relationship_type'),extra=1,formset=BaseRelationsFormSet)
|
||||
# RelationFormSet = modelformset_factory(Relationship,fields=('feature2','relationship_type'),extra=1,formset=BaseRelationsFormSet)
|
||||
|
|
Loading…
Reference in New Issue
Block a user