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

Search All Python files Django + Support Double Quote identification #368

Merged
merged 4 commits into from
Jul 27, 2022

Conversation

JakeCooper
Copy link
Contributor

@JakeCooper JakeCooper commented Jul 26, 2022

What does this PR address?

Fixes an issue where the WSGI_APPLICATION identified could be somewhere other than
settings.py, as well as supports the usecase of double quotes, as well as the original single quotes usecase

Fixes #367 (issue)

Before submitting:

  • Make sure to follow GitHub's
    guide
    on creating PR.
  • Did you read through contribution
    guidelines
    ?
  • Did your changes require updates to the documentation? Have you updated those accordingly?
  • Did you write tests to cover your changes? Did it pass locally when running cargo test?
  • Have you run cargo fmt, cargo check and cargo clippy locally to ensure that CI passes?

src/providers/python.rs Outdated Show resolved Hide resolved
@JakeCooper JakeCooper changed the title Search All Python files Django Search All Python files Django + Support Double Quote identification Jul 26, 2022
let re = Regex::new(r"WSGI_APPLICATION = '(.*).application'").unwrap();
let re = Regex::new(r#"WSGI_APPLICATION = ["|'](.*).application["|']"#).unwrap();

println!("{:?}", paths.len());
Copy link
Contributor

Choose a reason for hiding this comment

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

Can remove this

@JakeCooper JakeCooper merged commit b7f0598 into main Jul 27, 2022
@JakeCooper JakeCooper deleted the cooper/django-thing branch July 27, 2022 02:36
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.

Non-Trivial Django Applications Fail to Containerize
3 participants