-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* run linter * add Linter action
- Loading branch information
Showing
8 changed files
with
102 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Linter | ||
|
||
on: | ||
pull_request: | ||
branches: ['master', 'main'] | ||
paths-ignore: ['docs/**'] | ||
|
||
push: | ||
branches: ['master', 'main'] | ||
paths-ignore: ['docs/**'] | ||
|
||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
linter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
# Consider using pre-commit.ci for open source project | ||
- name: Run pre-commit | ||
uses: abe-101/[email protected] | ||
with: | ||
extra_args: --hook-stage push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
exclude: '^docs/|/migrations/|devcontainer.json' | ||
default_stages: [commit] | ||
|
||
default_language_version: | ||
python: python3.12 | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: check-builtin-literals | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: detect-private-key | ||
|
||
- repo: https://github.com/adamchainz/django-upgrade | ||
rev: '1.16.0' | ||
hooks: | ||
- id: django-upgrade | ||
args: ['--target-version', '4.2'] | ||
|
||
# Run the Ruff linter. | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.3.4 | ||
hooks: | ||
# Linter | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
# Formatter | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/Riverside-Healthcare/djLint | ||
rev: v1.34.1 | ||
hooks: | ||
- id: djlint-reformat-django | ||
- id: djlint-django | ||
|
||
|
||
|
||
# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date | ||
ci: | ||
autoupdate_schedule: weekly | ||
skip: [] | ||
submodules: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="description" content="Dj-Stripe Example Project"> | ||
<meta name="author" content="Abe Hanoka"> | ||
<meta name="keywords" | ||
content="Dj-Stripe, Stripe, Django, Payment Integration"> | ||
<title>Dj-Stripe Example Project</title> | ||
<script src="https://js.stripe.com/v3/"></script> | ||
<link rel="stylesheet" href="https://unpkg.com/mvp.css" /> | ||
<link rel="stylesheet" href="https://unpkg.com/mvp.css"> | ||
</head> | ||
<body> | ||
{% block content %} {% endblock %} | ||
{% block content %} | ||
{% endblock content %} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
{% extends "base.html" %} {% block content %} | ||
|
||
<script type="application/javascript"> | ||
{% extends "base.html" %} | ||
{% block content %} | ||
<script type="application/javascript"> | ||
const stripe = Stripe("{{ stripe_public_key }}"); | ||
stripe.redirectToCheckout({ | ||
sessionId: "{{ checkout_session_id }}", | ||
}); | ||
</script> | ||
|
||
{% endblock %} | ||
</script> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/usr/bin/env python | ||
"""Django's command-line utility for administrative tasks.""" | ||
|
||
import os | ||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,15 @@ version = "0.1.0" | |
description = "" | ||
authors = ["Jerome Leclanche <[email protected]>"] | ||
# Uncomment if using a local copy | ||
# package-mode = false | ||
package-mode = false | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
django = "^4.2" | ||
django-environ = "^0.11.2" | ||
# Choose between using the latest verion or a local copy | ||
dj-stripe = {git = "https://github.com/dj-stripe/dj-stripe.git"} | ||
# dj-stripe = { path = "../dj-stripe" } | ||
# dj-stripe = {git = "https://github.com/dj-stripe/dj-stripe.git"} | ||
dj-stripe = { path = "../dj-stripe" } | ||
|
||
[tool.poetry.dev-dependencies] | ||
|
||
|