-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c308e74
commit 1478e09
Showing
95 changed files
with
3,619 additions
and
3,619 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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
#!/bin/bash | ||
|
||
#### Django secret key #### | ||
SECRET_KEY=SECRET_KEY | ||
|
||
#### Django debug mode default True #### | ||
DEBUG=True | ||
|
||
#### Django allowed hosts default localhost, 127.0.0.1 #### | ||
ALLOWED_HOSTS=localhost,127.0.0.1 | ||
|
||
#### JWT (RS256) private, public keys default #### | ||
PRIVATE_KEY_PATH=security_settings/private_key.pem | ||
PUBLIC_KEY_PATH=security_settings/public_key.pem | ||
|
||
#### Django database environs sqlite, postgres #### | ||
DATABASE_ENVIRON=sqlite | ||
|
||
#### PostgreSQL configurations #### | ||
POSTGRES_NAME=POSTGRES_NAME | ||
POSTGRES_USER=POSTGRES_USER | ||
POSTGRES_PASSWORD=POSTGRES_PASSWORD | ||
POSTGRES_HOST=localhost | ||
POSTGRES_PORT=5432 | ||
#!/bin/bash | ||
|
||
#### Django secret key #### | ||
SECRET_KEY=SECRET_KEY | ||
|
||
#### Django debug mode default True #### | ||
DEBUG=True | ||
|
||
#### Django allowed hosts default localhost, 127.0.0.1 #### | ||
ALLOWED_HOSTS=localhost,127.0.0.1 | ||
|
||
#### JWT (RS256) private, public keys default #### | ||
PRIVATE_KEY_PATH=security_settings/private_key.pem | ||
PUBLIC_KEY_PATH=security_settings/public_key.pem | ||
|
||
#### Django database environs sqlite, postgres #### | ||
DATABASE_ENVIRON=sqlite | ||
|
||
#### PostgreSQL configurations #### | ||
POSTGRES_NAME=POSTGRES_NAME | ||
POSTGRES_USER=POSTGRES_USER | ||
POSTGRES_PASSWORD=POSTGRES_PASSWORD | ||
POSTGRES_HOST=localhost | ||
POSTGRES_PORT=5432 |
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,27 +1,27 @@ | ||
[flake8] | ||
# Maximum allowed line length (PEP8 recommends 79, but you can set 88 for flexibility) | ||
max-line-length = 88 | ||
|
||
# Ignore specific errors and warnings | ||
# E501: Line too long | ||
# W503: Line break occurred before a binary operator (preference to W504 in black formatting) | ||
# E231: Missing whitespace after ',' | ||
# Customize based on your needs | ||
ignore = E501, W503, E231 | ||
|
||
# Exclude specific directories (e.g., migrations, static files, or virtual environments) | ||
exclude = | ||
.git, | ||
__pycache__, | ||
migrations, | ||
static, | ||
env, # your virtual environment directory | ||
|
||
# Enable checking for complexity | ||
max-complexity = 10 | ||
|
||
# Show the source code that caused the issue | ||
show-source = True | ||
|
||
# Format errors in a certain way (useful for linting tools integration) | ||
format = %(path)s:%(row)d:%(col)d: %(code)s %(text)s | ||
[flake8] | ||
# Maximum allowed line length (PEP8 recommends 79, but you can set 88 for flexibility) | ||
max-line-length = 88 | ||
|
||
# Ignore specific errors and warnings | ||
# E501: Line too long | ||
# W503: Line break occurred before a binary operator (preference to W504 in black formatting) | ||
# E231: Missing whitespace after ',' | ||
# Customize based on your needs | ||
ignore = E501, W503, E231 | ||
|
||
# Exclude specific directories (e.g., migrations, static files, or virtual environments) | ||
exclude = | ||
.git, | ||
__pycache__, | ||
migrations, | ||
static, | ||
env, # your virtual environment directory | ||
|
||
# Enable checking for complexity | ||
max-complexity = 10 | ||
|
||
# Show the source code that caused the issue | ||
show-source = True | ||
|
||
# Format errors in a certain way (useful for linting tools integration) | ||
format = %(path)s:%(row)d:%(col)d: %(code)s %(text)s |
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,15 +1,15 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [RustamovAkrom] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: AkromRustamov # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
polar: # Replace with a single Polar username | ||
buy_me_a_coffee: akromjonru1 # Replace with a single Buy Me a Coffee username | ||
thanks_dev: rustamovakrom # Replace with a single thanks.dev username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] | ||
# These are supported funding model platforms | ||
|
||
github: [RustamovAkrom] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: AkromRustamov # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
polar: # Replace with a single Polar username | ||
buy_me_a_coffee: akromjonru1 # Replace with a single Buy Me a Coffee username | ||
thanks_dev: rustamovakrom # Replace with a single thanks.dev username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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,38 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,62 +1,62 @@ | ||
name: Django CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "master" | ||
pull_request: | ||
branches: | ||
- "main" | ||
- "master" | ||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9] | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install OpenSSl | ||
run: sudo apt-get install openssl | ||
|
||
- name: Generate private and public keys | ||
run: | | ||
mkdir -p security | ||
openssl genpkey -algorithm RSA -out security/private_key.pem -pkeyopt rsa_keygen_bits:2048 | ||
openssl rsa -pubout -in security/private_key.pem -out security/public_key.pem | ||
echo "Private key saved as security/private_key.pem" | ||
echo "Public key saved as security/public_key.pem" | ||
- name: Create .env file | ||
run: | | ||
touch .env | ||
echo PRIVATE_KEY_PATH=${{ secrets.PRIVATE_KEY_PATH }} >> .env | ||
echo PUBLIC_KEY_PATH=${{ secrets.PUBLIC_KEY_PATH }} >> .env | ||
- name: Check if .env has been updated | ||
run: | | ||
cat .env | ||
- name: Clean up keys (Optional) | ||
run: | | ||
rm -rf security | ||
echo "Keys removed after use." | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run Tests | ||
run: | | ||
python manage.py test | ||
name: Django CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "master" | ||
pull_request: | ||
branches: | ||
- "main" | ||
- "master" | ||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9] | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install OpenSSl | ||
run: sudo apt-get install openssl | ||
|
||
- name: Generate private and public keys | ||
run: | | ||
mkdir -p security | ||
openssl genpkey -algorithm RSA -out security/private_key.pem -pkeyopt rsa_keygen_bits:2048 | ||
openssl rsa -pubout -in security/private_key.pem -out security/public_key.pem | ||
echo "Private key saved as security/private_key.pem" | ||
echo "Public key saved as security/public_key.pem" | ||
- name: Create .env file | ||
run: | | ||
touch .env | ||
echo PRIVATE_KEY_PATH=security/private_key.pem >> .env | ||
echo PUBLIC_KEY_PATH=security/public_key.pem >> .env | ||
- name: Check if .env has been updated | ||
run: | | ||
cat .env | ||
- name: Clean up keys (Optional) | ||
run: | | ||
rm -rf security | ||
echo "Keys removed after use." | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run Tests | ||
run: | | ||
python manage.py test |
Oops, something went wrong.