Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix filtering Hit model by ip to include the HitCount model instance #38

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

karimabdelhakim
Copy link

include the HitCount model instance in the has_limit_reached_by_ip method to filter the Hit model by the IP and HitCount instance as it is done in the has_limit_reached_by_session method

@abhiabhi94
Copy link
Owner

Hey @karimabdelhakim thanks for the contribution. I hope I can find some time to fix the CI pipeline soon, it would be great if you have time and want to take a stab at it. Let me know if you need any help.

update python and django versions
change 3.7.1 to 3.7 and change actions/setup-python@v2 to v4
change actions/setup-python@v4 to v5 and actions/checkout@v2 to actions/checkout@v4
change setup-python@v4 to v5
downgrade ubuntu version to ubuntu-22.04 to support python 3.7
add more django versions to envlist
@karimabdelhakim
Copy link
Author

Hey @abhiabhi94 i did some changes hopefully this works

@karimabdelhakim
Copy link
Author

Hi @abhiabhi94 CI pipeline is fixed

Copy link
Owner

@abhiabhi94 abhiabhi94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

Please move the changes for CI to a separate commit or PR. It will allow the future us to easily come back and review the change set.

Let me know if you get stuck anywhere.

@@ -64,23 +64,23 @@ jobs:

tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change?

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please make the changes to CI in a separate commit or PR? the rationale is to keep the commit history clean, so that it makes sense to look back at a change set for the future us.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it makes sense to track the changes in this file? I would say no. feel free to remove this from the version control

@@ -43,6 +43,9 @@ deps =
dj31: Django>=3.1,<3.2
dj32: Django>=3.2,<3.3
dj40: Django>=4.0,<4.1
dj42: Django>=4.2,<4.3
dj50: Django>=5.0,<5.1
dj51: Django>=5.1,<5.2
djmain: https://github.com/django/django/archive/main.tar.gz
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if main was removed from the testing above, this too can be removed. it was used to test the changes with the bleeding edge of django, to allow for faster feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants