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

Feature/restore deleted events #310

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dev.db
test.db
.idea
config.py

# Byte-compiled / optimized / DLL files
Expand Down Expand Up @@ -161,3 +162,7 @@ app/routers/stam
.idea

junit/

# .DS_Store
.DS_Store
DS_Store
42 changes: 27 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
repos:
# Flake8 to check style is OK
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
# yapf to fix many style mistakes
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
entry: black
language: python
language_version: python3
require_serial: true
types_or: [python, pyi]
# More built in style checks and fixes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
Expand All @@ -28,10 +13,37 @@ repos:
- id: check-merge-conflict
- id: end-of-file-fixer
- id: sort-simple-yaml
- repo: https://github.com/pycqa/isort
rev: 5.7.0
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--line-length", "79"]
- id: isort
name: isort (cython)
types: [cython]
- id: isort
name: isort (pyi)
types: [pyi]
# Black: to fix many style mistakes
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
entry: black
language: python
language_version: python3
require_serial: true
types_or: [python, pyi]
- repo: meta
hooks:
- id: check-useless-excludes
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.1.0
hooks:
- id: add-trailing-comma
# Flake8 to check style is OK
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* PureDreamer - Developer
* ShiZinDle - Developer
* YairEn - Developer
* IdanPelled - Developer

# Special thanks to

Expand Down
5 changes: 5 additions & 0 deletions app/config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ PSQL_ENVIRONMENT = False
MEDIA_DIRECTORY = 'media'
PICTURE_EXTENSION = '.png'
AVATAR_SIZE = (120, 120)
# For security reasons, set the upload path to a local absolute path.
# Or for testing environment - just specify a folder name
# that will be created under /app/
UPLOAD_DIRECTORY = 'event_images'


# DEFAULT WEBSITE LANGUAGE
Expand Down Expand Up @@ -63,6 +67,7 @@ email_conf = ConnectionConfig(
JWT_KEY = "JWT_KEY_PLACEHOLDER"
JWT_ALGORITHM = "HS256"
JWT_MIN_EXP = 60 * 24 * 7

templates = Jinja2Templates(directory=os.path.join("app", "templates"))

# application name
Expand Down
10 changes: 6 additions & 4 deletions app/database/alembic/env.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
from logging.config import fileConfig
import os
from logging.config import fileConfig

from alembic import context
from sqlalchemy import create_engine

from app import config as app_config
from app.database.models import Base


SQLALCHEMY_DATABASE_URL = os.getenv(
"DATABASE_CONNECTION_STRING", app_config.DEVELOPMENT_DATABASE_STRING)
"DATABASE_CONNECTION_STRING",
app_config.DEVELOPMENT_DATABASE_STRING,
)

# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
Expand Down Expand Up @@ -66,7 +67,8 @@ def run_migrations_online():

with connectable.connect() as connection:
context.configure(
connection=connection, target_metadata=target_metadata,
connection=connection,
target_metadata=target_metadata,
)

with context.begin_transaction():
Expand Down
Loading