Adaptation du modele au scenario d'usage du connecteur
Modele derive du connecteur csvdatasource
This commit is contained in:
parent
91552103c2
commit
847e4f3d62
|
@ -27,9 +27,12 @@ class QueryForm(forms.ModelForm):
|
|||
widgets = {
|
||||
'resource': forms.HiddenInput(),
|
||||
'filters': forms.Textarea(attrs={'rows': 2}),
|
||||
'projections': forms.Textarea(attrs={'rows': 2}),
|
||||
'order': forms.Textarea(attrs={'rows': 2}),
|
||||
'distinct': forms.Textarea(attrs={'rows': 2}),
|
||||
'attributes' : forms.Textarea(attrs={'rows': 2}),
|
||||
'scope' : forms.RadioSelect,
|
||||
'distinguished_name' : forms.Textarea(attrs={'rows': 2}),
|
||||
#'projections': forms.Textarea(attrs={'rows': 2}),
|
||||
#'order': forms.Textarea(attrs={'rows': 2}),
|
||||
#'distinct': forms.Textarea(attrs={'rows': 2}),
|
||||
}
|
||||
fields = '__all__'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from django.core.urlresolvers import reverse
|
||||
from django.db import models
|
||||
from django import forms
|
||||
#from django import forms
|
||||
from passerelle.base.models import BaseResource
|
||||
from passerelle.utils.jsonresponse import APIError
|
||||
from passerelle.utils.api import endpoint
|
||||
|
@ -60,12 +60,11 @@ class Query(models.Model):
|
|||
description = models.TextField('Description', blank=True)
|
||||
filters = models.TextField('Filters', blank=True,
|
||||
help_text='List of filter clauses (LDAP RFC4515 expression)')
|
||||
attributes = models.TextField('Attributes', blank=True, initial='ALL_ATTRIBUTES',
|
||||
help_text='List of attributes to retrieve for matching entries'.)
|
||||
scope = models.ChoiceField(widget=forms.RadioSelect,
|
||||
choices=CHOICES,
|
||||
help_text='Search scope for the query') #FIXME
|
||||
distinguished_name = models.TextField('Distinguished name', blank=True, initial=base,
|
||||
attributes = models.TextField('Attributes', blank=True, #initial='ALL_ATTRIBUTES',
|
||||
help_text='List of attributes to retrieve for matching entries.')
|
||||
scope = models.CharField(choices=CHOICES, max_length=1)
|
||||
#help_text='Search scope for the query') #FIXME
|
||||
distinguished_name = models.TextField('Distinguished name', blank=True, #initial=base,
|
||||
help_text='Distinguished name for the LDAP operation')
|
||||
#projections = models.TextField('Projections', blank=True,
|
||||
# help_text='List of projections (name:expression)')
|
||||
|
|
Reference in New Issue