Skip to content

Commit 1478e09

Browse files
committed
update all project
1 parent c308e74 commit 1478e09

File tree

95 files changed

+3619
-3619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+3619
-3619
lines changed

.env-example

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
#!/bin/bash
2-
3-
#### Django secret key ####
4-
SECRET_KEY=SECRET_KEY
5-
6-
#### Django debug mode default True ####
7-
DEBUG=True
8-
9-
#### Django allowed hosts default localhost, 127.0.0.1 ####
10-
ALLOWED_HOSTS=localhost,127.0.0.1
11-
12-
#### JWT (RS256) private, public keys default ####
13-
PRIVATE_KEY_PATH=security_settings/private_key.pem
14-
PUBLIC_KEY_PATH=security_settings/public_key.pem
15-
16-
#### Django database environs sqlite, postgres ####
17-
DATABASE_ENVIRON=sqlite
18-
19-
#### PostgreSQL configurations ####
20-
POSTGRES_NAME=POSTGRES_NAME
21-
POSTGRES_USER=POSTGRES_USER
22-
POSTGRES_PASSWORD=POSTGRES_PASSWORD
23-
POSTGRES_HOST=localhost
24-
POSTGRES_PORT=5432
1+
#!/bin/bash
2+
3+
#### Django secret key ####
4+
SECRET_KEY=SECRET_KEY
5+
6+
#### Django debug mode default True ####
7+
DEBUG=True
8+
9+
#### Django allowed hosts default localhost, 127.0.0.1 ####
10+
ALLOWED_HOSTS=localhost,127.0.0.1
11+
12+
#### JWT (RS256) private, public keys default ####
13+
PRIVATE_KEY_PATH=security_settings/private_key.pem
14+
PUBLIC_KEY_PATH=security_settings/public_key.pem
15+
16+
#### Django database environs sqlite, postgres ####
17+
DATABASE_ENVIRON=sqlite
18+
19+
#### PostgreSQL configurations ####
20+
POSTGRES_NAME=POSTGRES_NAME
21+
POSTGRES_USER=POSTGRES_USER
22+
POSTGRES_PASSWORD=POSTGRES_PASSWORD
23+
POSTGRES_HOST=localhost
24+
POSTGRES_PORT=5432

.flake8

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
[flake8]
2-
# Maximum allowed line length (PEP8 recommends 79, but you can set 88 for flexibility)
3-
max-line-length = 88
4-
5-
# Ignore specific errors and warnings
6-
# E501: Line too long
7-
# W503: Line break occurred before a binary operator (preference to W504 in black formatting)
8-
# E231: Missing whitespace after ','
9-
# Customize based on your needs
10-
ignore = E501, W503, E231
11-
12-
# Exclude specific directories (e.g., migrations, static files, or virtual environments)
13-
exclude =
14-
.git,
15-
__pycache__,
16-
migrations,
17-
static,
18-
env, # your virtual environment directory
19-
20-
# Enable checking for complexity
21-
max-complexity = 10
22-
23-
# Show the source code that caused the issue
24-
show-source = True
25-
26-
# Format errors in a certain way (useful for linting tools integration)
27-
format = %(path)s:%(row)d:%(col)d: %(code)s %(text)s
1+
[flake8]
2+
# Maximum allowed line length (PEP8 recommends 79, but you can set 88 for flexibility)
3+
max-line-length = 88
4+
5+
# Ignore specific errors and warnings
6+
# E501: Line too long
7+
# W503: Line break occurred before a binary operator (preference to W504 in black formatting)
8+
# E231: Missing whitespace after ','
9+
# Customize based on your needs
10+
ignore = E501, W503, E231
11+
12+
# Exclude specific directories (e.g., migrations, static files, or virtual environments)
13+
exclude =
14+
.git,
15+
__pycache__,
16+
migrations,
17+
static,
18+
env, # your virtual environment directory
19+
20+
# Enable checking for complexity
21+
max-complexity = 10
22+
23+
# Show the source code that caused the issue
24+
show-source = True
25+
26+
# Format errors in a certain way (useful for linting tools integration)
27+
format = %(path)s:%(row)d:%(col)d: %(code)s %(text)s

.github/FUNDING.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# These are supported funding model platforms
2-
3-
github: [RustamovAkrom] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4-
patreon: AkromRustamov # Replace with a single Patreon username
5-
open_collective: # Replace with a single Open Collective username
6-
ko_fi: # Replace with a single Ko-fi username
7-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9-
liberapay: # Replace with a single Liberapay username
10-
issuehunt: # Replace with a single IssueHunt username
11-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12-
polar: # Replace with a single Polar username
13-
buy_me_a_coffee: akromjonru1 # Replace with a single Buy Me a Coffee username
14-
thanks_dev: rustamovakrom # Replace with a single thanks.dev username
15-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
1+
# These are supported funding model platforms
2+
3+
github: [RustamovAkrom] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: AkromRustamov # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: akromjonru1 # Replace with a single Buy Me a Coffee username
14+
thanks_dev: rustamovakrom # Replace with a single thanks.dev username
15+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
8-
---
9-
10-
**Describe the bug**
11-
A clear and concise description of what the bug is.
12-
13-
**To Reproduce**
14-
Steps to reproduce the behavior:
15-
1. Go to '...'
16-
2. Click on '....'
17-
3. Scroll down to '....'
18-
4. See error
19-
20-
**Expected behavior**
21-
A clear and concise description of what you expected to happen.
22-
23-
**Screenshots**
24-
If applicable, add screenshots to help explain your problem.
25-
26-
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
30-
31-
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
36-
37-
**Additional context**
38-
Add any other context about the problem here.
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.

.github/workflows/django.yml

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
1-
name: Django CI
2-
3-
on:
4-
push:
5-
branches:
6-
- "main"
7-
- "master"
8-
pull_request:
9-
branches:
10-
- "main"
11-
- "master"
12-
jobs:
13-
14-
build:
15-
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
python-version: [3.8, 3.9]
19-
20-
steps:
21-
- name: Check out the repository
22-
uses: actions/checkout@v4
23-
24-
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v3
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
29-
- name: Install OpenSSl
30-
run: sudo apt-get install openssl
31-
32-
- name: Generate private and public keys
33-
run: |
34-
mkdir -p security
35-
openssl genpkey -algorithm RSA -out security/private_key.pem -pkeyopt rsa_keygen_bits:2048
36-
openssl rsa -pubout -in security/private_key.pem -out security/public_key.pem
37-
echo "Private key saved as security/private_key.pem"
38-
echo "Public key saved as security/public_key.pem"
39-
40-
- name: Create .env file
41-
run: |
42-
touch .env
43-
echo PRIVATE_KEY_PATH=${{ secrets.PRIVATE_KEY_PATH }} >> .env
44-
echo PUBLIC_KEY_PATH=${{ secrets.PUBLIC_KEY_PATH }} >> .env
45-
46-
- name: Check if .env has been updated
47-
run: |
48-
cat .env
49-
50-
- name: Clean up keys (Optional)
51-
run: |
52-
rm -rf security
53-
echo "Keys removed after use."
54-
55-
- name: Install Dependencies
56-
run: |
57-
python -m pip install --upgrade pip
58-
pip install -r requirements.txt
59-
60-
- name: Run Tests
61-
run: |
62-
python manage.py test
1+
name: Django CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
- "master"
8+
pull_request:
9+
branches:
10+
- "main"
11+
- "master"
12+
jobs:
13+
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: [3.8, 3.9]
19+
20+
steps:
21+
- name: Check out the repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v3
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install OpenSSl
30+
run: sudo apt-get install openssl
31+
32+
- name: Generate private and public keys
33+
run: |
34+
mkdir -p security
35+
openssl genpkey -algorithm RSA -out security/private_key.pem -pkeyopt rsa_keygen_bits:2048
36+
openssl rsa -pubout -in security/private_key.pem -out security/public_key.pem
37+
echo "Private key saved as security/private_key.pem"
38+
echo "Public key saved as security/public_key.pem"
39+
40+
- name: Create .env file
41+
run: |
42+
touch .env
43+
echo PRIVATE_KEY_PATH=security/private_key.pem >> .env
44+
echo PUBLIC_KEY_PATH=security/public_key.pem >> .env
45+
46+
- name: Check if .env has been updated
47+
run: |
48+
cat .env
49+
50+
- name: Clean up keys (Optional)
51+
run: |
52+
rm -rf security
53+
echo "Keys removed after use."
54+
55+
- name: Install Dependencies
56+
run: |
57+
python -m pip install --upgrade pip
58+
pip install -r requirements.txt
59+
60+
- name: Run Tests
61+
run: |
62+
python manage.py test

0 commit comments

Comments
 (0)