Closed ManishShah120 closed 3 years ago
@nemesisdesign, @atb00ker have a look :thinking:
@nemesisdesign , @atb00ker
@nemesisdesign I have done the changes as requested have a look.
I realized something important. We're not documenting how to change the default throttling settings. Can it be done without having to modify the code of openwisp-ipam? I mean just by adding something in settings.py. Can you double check this please and let me know?
Okay, @nemesisdesign I'll check and see if it can be done and let you know.
I think I'll have to open an issue for fw-upgrader too since it should be done there too.
Yeah, I guess so
I realized something important. We're not documenting how to change the default throttling settings. Can it be done without having to modify the code of openwisp-ipam? I mean just by adding something in settings.py. Can you double check this please and let me know? I think I'll have to open an issue for fw-upgrader too since it should be done there too.
Hey, @nemesisdesign I confirmed in other openwisp modules and found no sign of documentation related to changing of default throttling settings, So it will be a good idea to introduce in it.
And about the modification of the default throttling settings, yes it can be done but in that case, we will need to move this portion of the code from apps.py
REST_FRAMEWORK_SETTINGS = {
'DEFAULT_THROTTLE_RATES': {
'ipam': default_or_test('400/hour', None)},
}
to settings.py
file, or if there is any other way possible please let me know. I'll try to learn and do it.
to settings.py file, or if there is any other way possible please let me know. I'll try to learn and do it.
This method looks good to me! :smile:
Yes, @nemesisdesign, It does override's the previous codes implemented in apps.py
and takes effect whatever value is provided in the settings.py
file and if we comment out this REST_FRAMEWORK
from settings.py then again it takes effect whatever is implemented in apps.py
file.
@nemesisdesign , Is this Okay.
closses #34