mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 19:26:53 +00:00
No longer load all users with "/users/all" to filter usernames and email Load the all entitlements with the "/entitlements" api instead of traversing all the users Set default value for the call limits inputs
67 lines
1.5 KiB
Python
67 lines
1.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
Forms of consumers app
|
|
"""
|
|
|
|
from django import forms
|
|
|
|
class ApiConsumersForm(forms.Form):
|
|
|
|
consumer_id = forms.CharField(
|
|
widget=forms.HiddenInput(),
|
|
required=True,
|
|
)
|
|
|
|
per_minute_call_limit = forms.IntegerField(
|
|
label='per_minute_call_limit',
|
|
widget=forms.NumberInput(
|
|
attrs={
|
|
'class': 'form-control',
|
|
}
|
|
),
|
|
initial=-1,
|
|
required=False,
|
|
)
|
|
|
|
per_hour_call_limit = forms.IntegerField(
|
|
label='per_hour_call_limit',
|
|
widget=forms.NumberInput(
|
|
attrs={
|
|
'class': 'form-control',
|
|
}
|
|
),
|
|
initial=-1,
|
|
required=False,
|
|
)
|
|
per_day_call_limit = forms.IntegerField(
|
|
label='per_day_call_limit',
|
|
widget=forms.NumberInput(
|
|
attrs={
|
|
'class': 'form-control',
|
|
}
|
|
),
|
|
initial=-1,
|
|
required=False,
|
|
)
|
|
per_week_call_limit = forms.IntegerField(
|
|
label='per_week_call_limit',
|
|
widget=forms.NumberInput(
|
|
attrs={
|
|
'class': 'form-control',
|
|
}
|
|
),
|
|
initial=-1,
|
|
required=False,
|
|
)
|
|
|
|
per_month_call_limit = forms.IntegerField(
|
|
label='per_month_call_limit',
|
|
widget=forms.NumberInput(
|
|
attrs={
|
|
'class': 'form-control',
|
|
}
|
|
),
|
|
initial=-1,
|
|
required=False,
|
|
)
|