Ejemplo n.º 1
0
class GalleryFilterSet(FilterSet):
    date_after = DateFilter("taken_at", lookup_expr="gte")
    date_before = DateFilter("taken_at", lookup_expr="lte")

    class Meta:
        model = Gallery
        fields = ("date_after", "date_before", "event")
Ejemplo n.º 2
0
class GalleryFilterSet(FilterSet):
    date_after = DateFilter('taken_at', lookup_expr='gte')
    date_before = DateFilter('taken_at', lookup_expr='lte')

    class Meta:
        model = Gallery
        fields = ('date_after', 'date_before', 'event')
Ejemplo n.º 3
0
class OrderFilter(FilterSet):
    start_date = DateFilter(field_name="date_created", lookup_expr='gte')
    end_date = DateFilter(field_name="date_created", lookup_expr='lte')

    class Meta:
        model = Order
        fields = '__all__'
        exclude = ['customer', 'date_created']
Ejemplo n.º 4
0
class OrderFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name='date_created', lookup_expr='gte')
    end_date = DateFilter(field_name='date_created', lookup_expr='lte')

    class Meta:
        model = Order
        fields = '__all__'
        exclude = ['student', 'date_created']
Ejemplo n.º 5
0
class OrderFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name="date_created", lookup_expr='gte')
    end_date = DateFilter(field_name="date_created", lookup_expr='lte')
    note = CharFilter(field_name="note", lookup_expr='icontains')
    class Meta:
        model = Order
        fields = '__all__'
        exclude = ['customer', 'date_created']
Ejemplo n.º 6
0
class BalanceFilter(django_filters.FilterSet):
    
    start_date1 = DateFilter(field_name="Date", lookup_expr='gte')
    end_date1 = DateFilter(field_name="Date", lookup_expr='lte')

    class Meta:
        model = Payment
        fields = ['supplierName', 'Date','start_date1','end_date1']
Ejemplo n.º 7
0
class IncomeFilter(django_filters.FilterSet):
    greater_than = DateFilter(field_name="date_received", lookup_expr='gte', widget=DateInput(attrs={'type': 'date'}))
    less_than = DateFilter(field_name="date_received", lookup_expr='lte', widget=DateInput(attrs={'type': 'date'}))
    class Meta:
        model = Income
        fields = {
            'source_name': ['icontains'],
        }
Ejemplo n.º 8
0
class attendenceFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name="date_created", lookup_expr='gte')
    end_date = DateFilter(field_name="date_created", lookup_expr='lte')

    class Meta:
        model = attendence
        fields = '__all__'
        exclude = ['comments']
Ejemplo n.º 9
0
class OrderFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name="date_created", lookup_expr="gte")
    end_date = DateFilter(field_name="date_created", lookup_expr="lte")

    class Meta:
        model = Order
        fields = '__all__'
        exclude = ['customer', 'date_created']
Ejemplo n.º 10
0
class OrderFilter(django_filters.FilterSet):
    startdate = DateFilter(field_name='date_posted', lookup_expr='gte')
    enddate = DateFilter(field_name='date_posted', lookup_expr='lte')
    fac_fname = CharFilter(field_name='fac_fname', lookup_expr='icontains')
    department = CharFilter(field_name='department', lookup_expr='icontains')
    class Meta:
        model = Faculty
        fields = ('fac_fname','department','faculty_id')
Ejemplo n.º 11
0
class EventsFilterSet(FilterSet):
    date_after = DateFilter('start_time', lookup_expr='gte')
    date_before = DateFilter('start_time', lookup_expr='lte')
    company = CharFilter('company')

    class Meta:
        model = Event
        fields = ('date_after', 'date_before')
Ejemplo n.º 12
0
class DocDateFilter(FilterSet):
    start_date = DateFilter(name="date", lookup_expr='gte')
    end_date = DateFilter(name="date", lookup_expr='lte')
    q = SearchQueryFilter()

    class Meta:
        model = Document
        fields = ['id', 'date', 'media_type', 'q']
Ejemplo n.º 13
0
class ProblemFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name="date_created", lookup_expr="gte")
    end_date = DateFilter(field_name="date_created", lookup_expr="lte")

    class Meta:
        model = Solutions
        fields = '__all__'
        exclude = ['Patients', 'date_created', 'Add_solution']
Ejemplo n.º 14
0
class OrderFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name="date", lookup_expr='gte')
    end_date = DateFilter(field_name="date", lookup_expr='lte')

    class Meta:
        model = Booking
        fields = ['service', 'time', 'status']
        exclude = ['customer']
Ejemplo n.º 15
0
class productfilter(django_filters.FilterSet):
    start_date = DateFilter(field_name='date_created', lookup_expr='gte')
    end_date = DateFilter(field_name='date_created', lookup_expr='lte')

    class Meta:
        model = Product
        fields = '__all__'
        exclude = ['date_created', 'discription', 'tags']
Ejemplo n.º 16
0
class ProductDiscountFilter(filters.FilterSet):
    product__name = CharFilter(lookup_expr='icontains')
    fdate = DateFilter(widget=TextInput(attrs={'type': 'date'}))
    ldate = DateFilter(widget=TextInput(attrs={'type': 'date'}))

    class Meta:
        model = ProductDiscount
        fields = ('product__name', 'price', 'fdate', 'ldate')
Ejemplo n.º 17
0
class FilterServeds(django_filters.FilterSet):
    startDate =DateFilter(field_name ='Date',lookup_expr='gte')
    endDate =DateFilter(field_name ='Date',lookup_expr='lte')
    #endDate =CharFilter(field_name ='note',lookup_expr='icontain')
    class Meta:
        model = Reports
        fields= 'Product',
        exclude = ['date_created']
Ejemplo n.º 18
0
    class Meta:
        start_date = DateFilter(field_name="date_created", lookup_expr='gte')
        end_date = DateFilter(field_name="date_created", lookup_expr='lte')

        note = CharFilter(field_name='note', lookup_expr='icontains')
        model = Order
        fields = '__all__'
        exclude = ['customer', 'date_created']
Ejemplo n.º 19
0
class TransactionFilter(django_filters.FilterSet):
    date_from = DateFilter(field_name="transaction_date", lookup_expr="gte")
    date_to = DateFilter(field_name="transaction_date", lookup_expr='lte')

    #rental_unit = RentalUnit.objects.filter(owner = self.request.user)
    class Meta:
        model = Transaction
        fields = []
class BorrowFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name="borrowedDate", lookup_expr='gte')
    end_date = DateFilter(field_name="borrowedDate", lookup_expr='lte')

    class Meta:
        model = Borrowed
        fields = '__all__'
        exclude = ['user', 'dueDate', 'borrowedDate']
Ejemplo n.º 21
0
class paymentFilter(django_filters.FilterSet):
    Comment = django_filters.CharFilter(lookup_expr='icontains')
    start_date = DateFilter(field_name="Date", lookup_expr='gte')
    end_date = DateFilter(field_name="Date", lookup_expr='lte')

    class Meta:
        model = Payment
        fields = ['supplierName', 'paidIn', 'Date', 'Comment','credit','start_date','end_date',]
Ejemplo n.º 22
0
class EventsFilterSet(FilterSet):
    date_after = DateFilter("start_time", lookup_expr="gte")
    date_before = DateFilter("start_time", lookup_expr="lte")
    company = CharFilter("company")

    class Meta:
        model = Event
        fields = ("date_after", "date_before")
Ejemplo n.º 23
0
class TrnFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name='date',lookup_expr="gte")
    end_date = DateFilter(field_name="date",lookup_expr="lte")
    name = CharFilter(field_name="name",lookup_expr="icontains")
    class Meta:
        model = Trasaction
        fields = "__all__"
        exclude =['date','profile ']
Ejemplo n.º 24
0
class DogFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name="birth_date", lookup_expr='gte')
    end_date = DateFilter(field_name="birth_date", lookup_expr='lte')
    body = CharFilter(field_name='body', lookup_expr='icontains')
    class Meta:
        model = Dog
        fields = '__all__'
        exclude = ['image', 'body', 'trekkhundreg']
class OrderFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name='date_created', lookup_expr='gte')
    end_date = DateFilter(field_name='date_created', lookup_expr='lte')
    note = CharFilter(field_name='note', lookup_expr='icontains')

    class Meta:
        model = Order
        fields = ['product', 'status']
Ejemplo n.º 26
0
class CashFlowFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name="date",lookup_expr='gte')
    end_date = DateFilter(field_name="date", lookup_expr='lte')
    desc = CharFilter(field_name='desc',lookup_expr='icontains')
    class Meta:
        model = cashFlow
        fields = '__all__'
        exclude = ['date', 'saldoCredit', 'saldoDebit']
Ejemplo n.º 27
0
class TransactionFilter(django_filters.FilterSet):
    Date_start = DateFilter(field_name="date", lookup_expr='gte')
    Date_end = DateFilter(field_name="date", lookup_expr='lte')

    class Meta:
        model = BuySellTransaction
        fields = ['property', 'buyer', 'owner']
        widgets = {'date': DateInput()}
Ejemplo n.º 28
0
class PermissionFilter(django_filters.FilterSet):
    start_date = DateFilter(field_name='date_created', lookup_expr='gte')
    end_date = DateFilter(field_name='date_created', lookup_expr='lte')

    class Meta:
        model = Permission
        fields = '__all__'
        exclude = ['customer', 'date_created']
Ejemplo n.º 29
0
class RecordFilter(FilterSet):
    start_date = DateFilter(field_name='time', lookup_expr='gt')
    end_date = DateFilter(field_name='time', lookup_expr='lt')
    time_range = DateRangeFilter(field_name='time')

    class Meta:
        model = Record
        fields = ('time', )
Ejemplo n.º 30
0
class BudgetFilter(FilterSet):

    budget_period_start = DateFilter(lookup_type='gte', name='period_start')

    budget_period_end = DateFilter(lookup_type='lte', name='period_end')

    class Meta:
        model = Budget