mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
Merge pull request #110 from DanielGrams/issue/109-isort
Add isort #109
This commit is contained in:
commit
78728ab6bf
1
.github/workflows/lint.yml
vendored
1
.github/workflows/lint.yml
vendored
@ -8,5 +8,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: jamescurtin/isort-action@master
|
||||
- uses: psf/black@stable
|
||||
- uses: TrueBrain/actions-flake8@v1.4.1
|
||||
4
.isort.cfg
Normal file
4
.isort.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
[settings]
|
||||
profile = black
|
||||
multi_line_output = 3
|
||||
skip = env
|
||||
@ -1,4 +1,9 @@
|
||||
repos:
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: 5.6.3
|
||||
hooks:
|
||||
- id: isort
|
||||
name: isort (python)
|
||||
- repo: https://github.com/psf/black
|
||||
rev: stable
|
||||
hooks:
|
||||
|
||||
16
.vscode/settings.json
vendored
16
.vscode/settings.json
vendored
@ -1,13 +1,23 @@
|
||||
{
|
||||
"python.pythonPath": "/Users/daniel/Projects/gsevpt/env/bin/python3",
|
||||
"editor.formatOnSave": true,
|
||||
"python.pythonPath": "./env/bin/python3",
|
||||
"python.formatting.provider": "black",
|
||||
"python.sortImports.args": [
|
||||
"-sp .isort.cfg"
|
||||
],
|
||||
"python.linting.enabled": true,
|
||||
"python.linting.pylintEnabled": false,
|
||||
"python.linting.flake8Enabled": true,
|
||||
"python.testing.pytestArgs": [
|
||||
"tests", "--capture=sys"
|
||||
"tests",
|
||||
"--capture=sys"
|
||||
],
|
||||
"python.testing.unittestEnabled": false,
|
||||
"python.testing.nosetestsEnabled": false,
|
||||
"python.testing.pytestEnabled": true
|
||||
"python.testing.pytestEnabled": true,
|
||||
"[python]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,10 +3,8 @@ from __future__ import with_statement
|
||||
import logging
|
||||
from logging.config import fileConfig
|
||||
|
||||
from sqlalchemy import engine_from_config
|
||||
from sqlalchemy import pool
|
||||
|
||||
from alembic import context
|
||||
from sqlalchemy import engine_from_config, pool
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
# access to the values within the .ini file in use.
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 50337ecd23db
|
||||
Create Date: 2020-10-27 20:58:57.392619
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "00daa8c472ba"
|
||||
|
||||
@ -5,9 +5,10 @@ Revises: 92f37474ad62
|
||||
Create Date: 2020-10-22 17:59:27.823624
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
from project.models import EventRejectionReason, EventReviewStatus
|
||||
|
||||
|
||||
@ -5,11 +5,10 @@ Revises: 6b7016f73688
|
||||
Create Date: 2020-10-02 09:29:12.932229
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.sql import text
|
||||
from alembic import op
|
||||
from geoalchemy2.types import Geometry
|
||||
|
||||
from sqlalchemy.sql import text
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "091deace5f08"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: da63ba1d58b1
|
||||
Create Date: 2020-10-18 11:55:12.315808
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "0a282a331e35"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: b1a6e7630185
|
||||
Create Date: 2021-02-07 17:54:44.257540
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "1fb9f679defb"
|
||||
|
||||
@ -5,10 +5,9 @@ Revises: 00daa8c472ba
|
||||
Create Date: 2020-11-08 16:14:01.866196
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "27da3ceea723"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 3c5b34fd1156
|
||||
Create Date: 2020-12-12 13:48:34.244288
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "31b60d93351d"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: a0a248667cd8
|
||||
Create Date: 2021-01-25 10:37:41.116909
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "35a6577b6af8"
|
||||
|
||||
@ -5,13 +5,14 @@ Revises: 27da3ceea723
|
||||
Create Date: 2020-11-08 19:11:32.132404
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import orm
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
from sqlalchemy import orm
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "3c5b34fd1156"
|
||||
down_revision = "27da3ceea723"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: fd7794ece0b3
|
||||
Create Date: 2020-07-17 19:54:25.703175
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "41512b20e07c"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 67216b6cf293
|
||||
Create Date: 2020-09-18 15:04:03.359403
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "4e913af88c33"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 6be822396123
|
||||
Create Date: 2020-10-27 20:31:42.566357
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "50337ecd23db"
|
||||
|
||||
@ -5,9 +5,8 @@ Revises: 7afc40e11791
|
||||
Create Date: 2020-09-29 15:38:44.033998
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "51c47c7f0bdb"
|
||||
|
||||
@ -5,9 +5,8 @@ Revises: ed6bb2084bbd
|
||||
Create Date: 2020-07-13 19:01:04.770613
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "5c8457f2eac1"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: dcd0b71650b0
|
||||
Create Date: 2020-07-30 13:13:44.694716
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "62e071b0da50"
|
||||
|
||||
@ -5,12 +5,12 @@ Revises: a336ac384c64
|
||||
Create Date: 2020-08-01 15:43:11.377833
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
from project.models import EventRejectionReason, EventReviewStatus
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "67216b6cf293"
|
||||
down_revision = "a336ac384c64"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: b1c05324cc13
|
||||
Create Date: 2020-07-28 16:29:41.403957
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "699c4f6a7fe8"
|
||||
|
||||
@ -5,12 +5,13 @@ Revises: a75bd9c8ad3a
|
||||
Create Date: 2020-10-01 11:09:16.765736
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "6b7016f73688"
|
||||
down_revision = "a75bd9c8ad3a"
|
||||
|
||||
@ -5,12 +5,13 @@ Revises: 021f602d9965
|
||||
Create Date: 2020-10-23 15:51:36.330825
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "6be822396123"
|
||||
down_revision = "021f602d9965"
|
||||
|
||||
@ -5,10 +5,9 @@ Revises: abf0f671ba27
|
||||
Create Date: 2020-07-07 10:11:08.217831
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "75c07cb9cfe3"
|
||||
|
||||
@ -5,12 +5,12 @@ Revises: a8c662c46047
|
||||
Create Date: 2020-09-28 10:38:46.424791
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
from project.models import FeaturedEventRejectionReason, FeaturedEventReviewStatus
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "7afc40e11791"
|
||||
down_revision = "a8c662c46047"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: dddeceadde74
|
||||
Create Date: 2020-12-30 17:38:19.511314
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "7b105c6e08bf"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: f71c86333bfb
|
||||
Create Date: 2020-09-24 18:53:02.861732
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "8f4df40a36f3"
|
||||
|
||||
@ -5,9 +5,8 @@ Revises: 0a282a331e35
|
||||
Create Date: 2020-10-18 13:06:47.639083
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "92f37474ad62"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 5c8457f2eac1
|
||||
Create Date: 2020-07-17 11:27:53.084732
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "975c22ae802b"
|
||||
|
||||
@ -5,12 +5,12 @@ Revises: e33f225323f3
|
||||
Create Date: 2021-01-18 15:02:58.354511
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from project.models import EventTargetGroupOrigin, EventAttendanceMode
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
from project.models import EventAttendanceMode, EventTargetGroupOrigin
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "a0a248667cd8"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 62e071b0da50
|
||||
Create Date: 2020-07-31 16:30:19.185088
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "a336ac384c64"
|
||||
|
||||
@ -5,10 +5,11 @@ Revises: 51c47c7f0bdb
|
||||
Create Date: 2020-09-29 16:53:02.520125
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
from project import dbtypes
|
||||
from project.models import (
|
||||
EventReferenceRequestRejectionReason,
|
||||
EventReferenceRequestReviewStatus,
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 8f4df40a36f3
|
||||
Create Date: 2020-09-25 11:26:03.139800
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "a8c662c46047"
|
||||
|
||||
@ -5,10 +5,9 @@ Revises: bbad7e33a780
|
||||
Create Date: 2020-06-30 21:09:35.692876
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "abf0f671ba27"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 41512b20e07c
|
||||
Create Date: 2020-07-26 15:20:17.685921
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "b128cc637447"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 35a6577b6af8
|
||||
Create Date: 2021-01-25 11:38:36.483434
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "b1a6e7630185"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: cce1284874fa
|
||||
Create Date: 2020-07-26 16:08:39.066127
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "b1c05324cc13"
|
||||
|
||||
@ -5,9 +5,8 @@ Revises:
|
||||
Create Date: 2020-06-24 21:17:25.548159
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "bbad7e33a780"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: b128cc637447
|
||||
Create Date: 2020-07-26 15:48:47.723256
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "cce1284874fa"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 091deace5f08
|
||||
Create Date: 2020-10-04 17:06:54.502012
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "da63ba1d58b1"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 699c4f6a7fe8
|
||||
Create Date: 2020-07-28 17:10:49.606513
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "dcd0b71650b0"
|
||||
|
||||
@ -5,12 +5,13 @@ Revises: 31b60d93351d
|
||||
Create Date: 2020-12-30 16:44:29.013647
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "dddeceadde74"
|
||||
down_revision = "31b60d93351d"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 7b105c6e08bf
|
||||
Create Date: 2020-12-30 17:59:47.917389
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "e33f225323f3"
|
||||
|
||||
@ -5,9 +5,8 @@ Revises: f1bc3fa623c7
|
||||
Create Date: 2020-07-08 08:53:44.373606
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "ed6bb2084bbd"
|
||||
|
||||
@ -5,10 +5,11 @@ Revises: 75c07cb9cfe3
|
||||
Create Date: 2020-07-07 15:49:58.653888
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
from project.models import EventTargetGroupOrigin, EventAttendanceMode, EventStatus
|
||||
from project.models import EventAttendanceMode, EventStatus, EventTargetGroupOrigin
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "f1bc3fa623c7"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 4e913af88c33
|
||||
Create Date: 2020-09-18 15:27:37.608869
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "f71c86333bfb"
|
||||
|
||||
@ -5,11 +5,11 @@ Revises: 975c22ae802b
|
||||
Create Date: 2020-07-17 19:51:08.457429
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy_utils
|
||||
from project import dbtypes
|
||||
from alembic import op
|
||||
|
||||
from project import dbtypes
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "fd7794ece0b3"
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
import os
|
||||
from flask import Flask, url_for, redirect, request, jsonify
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_security import (
|
||||
Security,
|
||||
SQLAlchemySessionUserDatastore,
|
||||
)
|
||||
|
||||
from flask import Flask, jsonify, redirect, request, url_for
|
||||
from flask_babelex import Babel
|
||||
from flask_cors import CORS
|
||||
from flask_qrcode import QRcode
|
||||
from flask_gzip import Gzip
|
||||
from flask_mail import Mail, email_dispatched
|
||||
from flask_migrate import Migrate
|
||||
from flask_gzip import Gzip
|
||||
from flask_qrcode import QRcode
|
||||
from flask_security import Security, SQLAlchemySessionUserDatastore
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from webargs import flaskparser
|
||||
|
||||
from project.custom_session_interface import CustomSessionInterface
|
||||
|
||||
# Create app
|
||||
@ -97,10 +96,11 @@ from project.jsonld import DateTimeEncoder
|
||||
|
||||
app.json_encoder = DateTimeEncoder
|
||||
|
||||
# Setup Flask-Security
|
||||
from project.models import User, Role
|
||||
from project.forms.security import ExtendedRegisterForm
|
||||
|
||||
# Setup Flask-Security
|
||||
from project.models import Role, User
|
||||
|
||||
user_datastore = SQLAlchemySessionUserDatastore(db.session, User, Role)
|
||||
security = Security(app, user_datastore, register_form=ExtendedRegisterForm)
|
||||
app.session_interface = CustomSessionInterface()
|
||||
@ -112,9 +112,14 @@ config_oauth(app)
|
||||
|
||||
# Init misc modules
|
||||
|
||||
from project import i10n
|
||||
from project import jinja_filters
|
||||
from project import init_data
|
||||
# API Resources
|
||||
import project.api
|
||||
import project.cli.dump
|
||||
|
||||
# Command line
|
||||
import project.cli.event
|
||||
import project.cli.user
|
||||
from project import i10n, init_data, jinja_filters
|
||||
|
||||
# Routes
|
||||
from project.views import (
|
||||
@ -123,17 +128,17 @@ from project.views import (
|
||||
admin_unit_member,
|
||||
admin_unit_member_invitation,
|
||||
api,
|
||||
dump,
|
||||
event,
|
||||
event_date,
|
||||
event_place,
|
||||
event_suggestion,
|
||||
dump,
|
||||
image,
|
||||
manage,
|
||||
organizer,
|
||||
oauth,
|
||||
oauth2_client,
|
||||
oauth2_token,
|
||||
organizer,
|
||||
planing,
|
||||
reference,
|
||||
reference_request,
|
||||
@ -143,13 +148,5 @@ from project.views import (
|
||||
widget,
|
||||
)
|
||||
|
||||
# API Resources
|
||||
import project.api
|
||||
|
||||
# Command line
|
||||
import project.cli.event
|
||||
import project.cli.dump
|
||||
import project.cli.user
|
||||
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
app.run()
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
from flask import abort
|
||||
from flask_login import login_user
|
||||
from flask_principal import Permission
|
||||
from flask_security import current_user
|
||||
from flask_security.utils import FsPermNeed
|
||||
from flask_principal import Permission
|
||||
from project.models import AdminUnitMember, AdminUnit
|
||||
from project.services.admin_unit import get_member_for_admin_unit_by_user_id
|
||||
from sqlalchemy import and_
|
||||
|
||||
from project.models import AdminUnit, AdminUnitMember
|
||||
from project.services.admin_unit import get_member_for_admin_unit_by_user_id
|
||||
|
||||
|
||||
def has_current_user_permission(permission):
|
||||
user_perm = Permission(FsPermNeed(permission))
|
||||
|
||||
@ -1,16 +1,17 @@
|
||||
from flask_restful import Api
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
from psycopg2.errorcodes import UNIQUE_VIOLATION, CHECK_VIOLATION
|
||||
from werkzeug.exceptions import HTTPException, UnprocessableEntity
|
||||
from marshmallow import ValidationError
|
||||
from project.utils import get_localized_scope
|
||||
from project import app
|
||||
from flask_marshmallow import Marshmallow
|
||||
from apispec import APISpec
|
||||
from apispec.ext.marshmallow import MarshmallowPlugin
|
||||
from flask_apispec.extension import FlaskApiSpec
|
||||
from flask import url_for
|
||||
from apispec.exceptions import DuplicateComponentNameError
|
||||
from apispec.ext.marshmallow import MarshmallowPlugin
|
||||
from flask import url_for
|
||||
from flask_apispec.extension import FlaskApiSpec
|
||||
from flask_marshmallow import Marshmallow
|
||||
from flask_restful import Api
|
||||
from marshmallow import ValidationError
|
||||
from psycopg2.errorcodes import CHECK_VIOLATION, UNIQUE_VIOLATION
|
||||
from sqlalchemy.exc import IntegrityError
|
||||
from werkzeug.exceptions import HTTPException, UnprocessableEntity
|
||||
|
||||
from project import app
|
||||
from project.utils import get_localized_scope
|
||||
|
||||
|
||||
class RestApi(Api):
|
||||
@ -165,11 +166,11 @@ def add_oauth2_scheme_with_transport(insecure: bool):
|
||||
|
||||
marshmallow_plugin.converter.add_attribute_function(enum_to_properties)
|
||||
|
||||
import project.api.dump.resources
|
||||
import project.api.event.resources
|
||||
import project.api.event_category.resources
|
||||
import project.api.event_date.resources
|
||||
import project.api.event_reference.resources
|
||||
import project.api.dump.resources
|
||||
import project.api.organization.resources
|
||||
import project.api.organizer.resources
|
||||
import project.api.place.resources
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
from flask_apispec import doc, marshal_with
|
||||
|
||||
from project.api import add_api_resource
|
||||
from flask_apispec import marshal_with, doc
|
||||
from project.api.dump.schemas import DumpResponseSchema
|
||||
from project.api.resources import BaseResource
|
||||
from project.api.schemas import NoneSchema
|
||||
from project.api.dump.schemas import DumpResponseSchema
|
||||
|
||||
|
||||
class DumpResource(BaseResource):
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
from project.api import marshmallow
|
||||
from marshmallow import fields
|
||||
|
||||
from project.api import marshmallow
|
||||
from project.api.event.schemas import EventDumpSchema
|
||||
from project.api.place.schemas import PlaceDumpSchema
|
||||
from project.api.location.schemas import LocationDumpSchema
|
||||
from project.api.event_category.schemas import EventCategoryDumpSchema
|
||||
from project.api.organizer.schemas import OrganizerDumpSchema
|
||||
from project.api.image.schemas import ImageDumpSchema
|
||||
from project.api.organization.schemas import OrganizationDumpSchema
|
||||
from project.api.event_reference.schemas import EventReferenceDumpSchema
|
||||
from project.api.image.schemas import ImageDumpSchema
|
||||
from project.api.location.schemas import LocationDumpSchema
|
||||
from project.api.organization.schemas import OrganizationDumpSchema
|
||||
from project.api.organizer.schemas import OrganizerDumpSchema
|
||||
from project.api.place.schemas import PlaceDumpSchema
|
||||
|
||||
|
||||
class DumpResponseSchema(marshmallow.Schema):
|
||||
|
||||
@ -1,32 +1,33 @@
|
||||
from project.api import add_api_resource
|
||||
from authlib.integrations.flask_oauth2 import current_token
|
||||
from flask import make_response
|
||||
from flask_apispec import marshal_with, doc, use_kwargs
|
||||
from project.api.resources import BaseResource
|
||||
from flask_apispec import doc, marshal_with, use_kwargs
|
||||
from sqlalchemy.orm import lazyload, load_only
|
||||
|
||||
from project import db
|
||||
from project.access import access_or_401, login_api_user_or_401
|
||||
from project.api import add_api_resource
|
||||
from project.api.event.schemas import (
|
||||
EventSchema,
|
||||
EventListRequestSchema,
|
||||
EventListResponseSchema,
|
||||
EventPatchRequestSchema,
|
||||
EventPostRequestSchema,
|
||||
EventSchema,
|
||||
EventSearchRequestSchema,
|
||||
EventSearchResponseSchema,
|
||||
EventPostRequestSchema,
|
||||
EventPatchRequestSchema,
|
||||
)
|
||||
from project.api.event_date.schemas import (
|
||||
EventDateListRequestSchema,
|
||||
EventDateListResponseSchema,
|
||||
)
|
||||
from project.api.resources import BaseResource
|
||||
from project.models import Event, EventDate
|
||||
from project.oauth2 import require_oauth
|
||||
from project.services.event import (
|
||||
get_events_query,
|
||||
get_event_with_details_or_404,
|
||||
get_events_query,
|
||||
update_event,
|
||||
)
|
||||
from project.services.event_search import EventSearchParams
|
||||
from sqlalchemy.orm import lazyload, load_only
|
||||
from project.oauth2 import require_oauth
|
||||
from authlib.integrations.flask_oauth2 import current_token
|
||||
from project import db
|
||||
from project.access import access_or_401, login_api_user_or_401
|
||||
from project.views.event import send_referenced_event_changed_mails
|
||||
|
||||
|
||||
|
||||
@ -1,34 +1,35 @@
|
||||
from project.api import marshmallow
|
||||
from marshmallow import fields, validate, ValidationError
|
||||
from dateutil.rrule import rrulestr
|
||||
from marshmallow import ValidationError, fields, validate
|
||||
from marshmallow_enum import EnumField
|
||||
from project.models import (
|
||||
Event,
|
||||
EventStatus,
|
||||
EventTargetGroupOrigin,
|
||||
EventAttendanceMode,
|
||||
)
|
||||
from project.api.schemas import (
|
||||
SQLAlchemyBaseSchema,
|
||||
IdSchemaMixin,
|
||||
TrackableSchemaMixin,
|
||||
PaginationRequestSchema,
|
||||
PaginationResponseSchema,
|
||||
|
||||
from project.api import marshmallow
|
||||
from project.api.event_category.schemas import (
|
||||
EventCategoryIdSchema,
|
||||
EventCategoryRefSchema,
|
||||
EventCategoryWriteIdSchema,
|
||||
)
|
||||
from project.api.fields import CustomDateTimeField
|
||||
from project.api.image.schemas import ImageSchema
|
||||
from project.api.organization.schemas import OrganizationRefSchema
|
||||
from project.api.organizer.schemas import OrganizerRefSchema, OrganizerWriteIdSchema
|
||||
from project.api.image.schemas import ImageSchema
|
||||
from project.api.place.schemas import (
|
||||
PlaceRefSchema,
|
||||
PlaceSearchItemSchema,
|
||||
PlaceWriteIdSchema,
|
||||
)
|
||||
from project.api.event_category.schemas import (
|
||||
EventCategoryRefSchema,
|
||||
EventCategoryIdSchema,
|
||||
EventCategoryWriteIdSchema,
|
||||
from project.api.schemas import (
|
||||
IdSchemaMixin,
|
||||
PaginationRequestSchema,
|
||||
PaginationResponseSchema,
|
||||
SQLAlchemyBaseSchema,
|
||||
TrackableSchemaMixin,
|
||||
)
|
||||
from project.models import (
|
||||
Event,
|
||||
EventAttendanceMode,
|
||||
EventStatus,
|
||||
EventTargetGroupOrigin,
|
||||
)
|
||||
from project.api.fields import CustomDateTimeField
|
||||
from dateutil.rrule import rrulestr
|
||||
|
||||
|
||||
class EventModelSchema(SQLAlchemyBaseSchema):
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
from flask_apispec import doc, marshal_with, use_kwargs
|
||||
|
||||
from project.api import add_api_resource
|
||||
from flask_apispec import marshal_with, doc, use_kwargs
|
||||
from project.api.resources import BaseResource
|
||||
from project.api.event_category.schemas import (
|
||||
EventCategoryListRequestSchema,
|
||||
EventCategoryListResponseSchema,
|
||||
)
|
||||
from project.api.resources import BaseResource
|
||||
from project.models import EventCategory
|
||||
|
||||
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
from marshmallow import fields
|
||||
|
||||
from project.api import marshmallow
|
||||
from project.models import EventCategory
|
||||
from project.api.schemas import (
|
||||
SQLAlchemyBaseSchema,
|
||||
IdSchemaMixin,
|
||||
PaginationRequestSchema,
|
||||
PaginationResponseSchema,
|
||||
SQLAlchemyBaseSchema,
|
||||
WriteIdSchemaMixin,
|
||||
)
|
||||
from project.models import EventCategory
|
||||
|
||||
|
||||
class EventCategoryModelSchema(SQLAlchemyBaseSchema):
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
from flask_apispec import doc, marshal_with, use_kwargs
|
||||
from sqlalchemy.orm import defaultload, lazyload
|
||||
|
||||
from project.api import add_api_resource
|
||||
from flask_apispec import marshal_with, doc, use_kwargs
|
||||
from project.api.resources import BaseResource
|
||||
from project.api.event_date.schemas import (
|
||||
EventDateSchema,
|
||||
EventDateListRequestSchema,
|
||||
EventDateListResponseSchema,
|
||||
EventDateSchema,
|
||||
EventDateSearchRequestSchema,
|
||||
EventDateSearchResponseSchema,
|
||||
)
|
||||
from project.models import EventDate, Event
|
||||
from project.api.resources import BaseResource
|
||||
from project.models import Event, EventDate
|
||||
from project.services.event import get_event_dates_query
|
||||
from project.services.event_search import EventSearchParams
|
||||
from sqlalchemy.orm import defaultload, lazyload
|
||||
|
||||
|
||||
class EventDateListResource(BaseResource):
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
from project.api import marshmallow
|
||||
from marshmallow import fields
|
||||
from project.models import EventDate
|
||||
|
||||
from project.api import marshmallow
|
||||
from project.api.event.schemas import (
|
||||
EventRefSchema,
|
||||
EventSearchItemSchema,
|
||||
EventSearchRequestSchema,
|
||||
)
|
||||
from project.api.schemas import PaginationRequestSchema, PaginationResponseSchema
|
||||
from project.models import EventDate
|
||||
|
||||
|
||||
class EventDateSchema(marshmallow.SQLAlchemySchema):
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
from flask_apispec import doc, marshal_with
|
||||
|
||||
from project.api import add_api_resource
|
||||
from flask_apispec import marshal_with, doc
|
||||
from project.api.resources import BaseResource
|
||||
from project.api.event_reference.schemas import EventReferenceSchema
|
||||
from project.api.resources import BaseResource
|
||||
from project.models import EventReference
|
||||
|
||||
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
from marshmallow import fields
|
||||
|
||||
from project.api import marshmallow
|
||||
from project.models import EventReference
|
||||
from project.api.schemas import PaginationRequestSchema, PaginationResponseSchema
|
||||
from project.api.event.schemas import EventRefSchema
|
||||
from project.api.organization.schemas import OrganizationRefSchema
|
||||
from project.api.schemas import PaginationRequestSchema, PaginationResponseSchema
|
||||
from project.models import EventReference
|
||||
|
||||
|
||||
class EventReferenceIdSchema(marshmallow.SQLAlchemySchema):
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
from marshmallow import fields, ValidationError
|
||||
from marshmallow import ValidationError, fields
|
||||
|
||||
from project.dateutils import berlin_tz
|
||||
|
||||
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
from marshmallow import validate, validates_schema, ValidationError
|
||||
from marshmallow import ValidationError, validate, validates_schema
|
||||
|
||||
from project.api import marshmallow
|
||||
from project.models import Location
|
||||
from project.api.fields import NumericStr
|
||||
from project.api.schemas import SQLAlchemyBaseSchema
|
||||
from project.models import Location
|
||||
|
||||
|
||||
class LocationModelSchema(SQLAlchemyBaseSchema):
|
||||
|
||||
@ -1,59 +1,60 @@
|
||||
from project.api import add_api_resource
|
||||
from flask_apispec import marshal_with, doc, use_kwargs
|
||||
from project.api.resources import BaseResource
|
||||
from project.api.organization.schemas import (
|
||||
OrganizationSchema,
|
||||
OrganizationListRequestSchema,
|
||||
OrganizationListResponseSchema,
|
||||
)
|
||||
from project.models import AdminUnit, Event
|
||||
from project.api.event_date.schemas import (
|
||||
EventDateSearchRequestSchema,
|
||||
EventDateSearchResponseSchema,
|
||||
)
|
||||
from project.api.event.schemas import (
|
||||
EventSearchRequestSchema,
|
||||
EventSearchResponseSchema,
|
||||
EventListRequestSchema,
|
||||
EventListResponseSchema,
|
||||
EventPostRequestSchema,
|
||||
EventIdSchema,
|
||||
)
|
||||
from project.api.organizer.schemas import (
|
||||
OrganizerListRequestSchema,
|
||||
OrganizerListResponseSchema,
|
||||
OrganizerIdSchema,
|
||||
OrganizerPostRequestSchema,
|
||||
)
|
||||
from project.api.event_reference.schemas import (
|
||||
EventReferenceListRequestSchema,
|
||||
EventReferenceListResponseSchema,
|
||||
)
|
||||
from project.services.reference import (
|
||||
get_reference_incoming_query,
|
||||
get_reference_outgoing_query,
|
||||
)
|
||||
from project.api.place.schemas import (
|
||||
PlaceListRequestSchema,
|
||||
PlaceListResponseSchema,
|
||||
PlaceIdSchema,
|
||||
PlacePostRequestSchema,
|
||||
)
|
||||
from project.services.event import get_event_dates_query, get_events_query, insert_event
|
||||
from project.services.event_search import EventSearchParams
|
||||
from project.services.admin_unit import (
|
||||
get_admin_unit_query,
|
||||
get_organizer_query,
|
||||
get_place_query,
|
||||
)
|
||||
from project.oauth2 import require_oauth
|
||||
from authlib.integrations.flask_oauth2 import current_token
|
||||
from flask_apispec import doc, marshal_with, use_kwargs
|
||||
|
||||
from project import db
|
||||
from project.access import (
|
||||
access_or_401,
|
||||
get_admin_unit_for_manage_or_404,
|
||||
login_api_user_or_401,
|
||||
)
|
||||
from project.api import add_api_resource
|
||||
from project.api.event.schemas import (
|
||||
EventIdSchema,
|
||||
EventListRequestSchema,
|
||||
EventListResponseSchema,
|
||||
EventPostRequestSchema,
|
||||
EventSearchRequestSchema,
|
||||
EventSearchResponseSchema,
|
||||
)
|
||||
from project.api.event_date.schemas import (
|
||||
EventDateSearchRequestSchema,
|
||||
EventDateSearchResponseSchema,
|
||||
)
|
||||
from project.api.event_reference.schemas import (
|
||||
EventReferenceListRequestSchema,
|
||||
EventReferenceListResponseSchema,
|
||||
)
|
||||
from project.api.organization.schemas import (
|
||||
OrganizationListRequestSchema,
|
||||
OrganizationListResponseSchema,
|
||||
OrganizationSchema,
|
||||
)
|
||||
from project.api.organizer.schemas import (
|
||||
OrganizerIdSchema,
|
||||
OrganizerListRequestSchema,
|
||||
OrganizerListResponseSchema,
|
||||
OrganizerPostRequestSchema,
|
||||
)
|
||||
from project.api.place.schemas import (
|
||||
PlaceIdSchema,
|
||||
PlaceListRequestSchema,
|
||||
PlaceListResponseSchema,
|
||||
PlacePostRequestSchema,
|
||||
)
|
||||
from project.api.resources import BaseResource
|
||||
from project.models import AdminUnit, Event
|
||||
from project.oauth2 import require_oauth
|
||||
from project.services.admin_unit import (
|
||||
get_admin_unit_query,
|
||||
get_organizer_query,
|
||||
get_place_query,
|
||||
)
|
||||
from project.services.event import get_event_dates_query, get_events_query, insert_event
|
||||
from project.services.event_search import EventSearchParams
|
||||
from project.services.reference import (
|
||||
get_reference_incoming_query,
|
||||
get_reference_outgoing_query,
|
||||
)
|
||||
|
||||
|
||||
class OrganizationResource(BaseResource):
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
from marshmallow import fields
|
||||
|
||||
from project.api import marshmallow
|
||||
from project.models import AdminUnit
|
||||
from project.api.location.schemas import LocationSchema
|
||||
from project.api.image.schemas import ImageSchema
|
||||
from project.api.location.schemas import LocationSchema
|
||||
from project.api.schemas import PaginationRequestSchema, PaginationResponseSchema
|
||||
from project.models import AdminUnit
|
||||
|
||||
|
||||
class OrganizationIdSchema(marshmallow.SQLAlchemySchema):
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
from project.api import add_api_resource
|
||||
from flask import make_response
|
||||
from flask_apispec import marshal_with, doc, use_kwargs
|
||||
from project.api.resources import BaseResource
|
||||
from project.api.organizer.schemas import (
|
||||
OrganizerSchema,
|
||||
OrganizerPostRequestSchema,
|
||||
OrganizerPatchRequestSchema,
|
||||
)
|
||||
from project.models import EventOrganizer
|
||||
from project.oauth2 import require_oauth
|
||||
from authlib.integrations.flask_oauth2 import current_token
|
||||
from flask import make_response
|
||||
from flask_apispec import doc, marshal_with, use_kwargs
|
||||
|
||||
from project import db
|
||||
from project.access import access_or_401, login_api_user_or_401
|
||||
from project.api import add_api_resource
|
||||
from project.api.organizer.schemas import (
|
||||
OrganizerPatchRequestSchema,
|
||||
OrganizerPostRequestSchema,
|
||||
OrganizerSchema,
|
||||
)
|
||||
from project.api.resources import BaseResource
|
||||
from project.models import EventOrganizer
|
||||
from project.oauth2 import require_oauth
|
||||
|
||||
|
||||
class OrganizerResource(BaseResource):
|
||||
|
||||
@ -1,21 +1,22 @@
|
||||
from marshmallow import fields, validate
|
||||
|
||||
from project.api import marshmallow
|
||||
from project.models import EventOrganizer
|
||||
from project.api.location.schemas import (
|
||||
LocationSchema,
|
||||
LocationPostRequestSchema,
|
||||
LocationPatchRequestSchema,
|
||||
)
|
||||
from project.api.image.schemas import ImageSchema
|
||||
from project.api.location.schemas import (
|
||||
LocationPatchRequestSchema,
|
||||
LocationPostRequestSchema,
|
||||
LocationSchema,
|
||||
)
|
||||
from project.api.organization.schemas import OrganizationRefSchema
|
||||
from project.api.schemas import (
|
||||
SQLAlchemyBaseSchema,
|
||||
IdSchemaMixin,
|
||||
WriteIdSchemaMixin,
|
||||
TrackableSchemaMixin,
|
||||
PaginationRequestSchema,
|
||||
PaginationResponseSchema,
|
||||
SQLAlchemyBaseSchema,
|
||||
TrackableSchemaMixin,
|
||||
WriteIdSchemaMixin,
|
||||
)
|
||||
from project.models import EventOrganizer
|
||||
|
||||
|
||||
class OrganizerModelSchema(SQLAlchemyBaseSchema):
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
from project.api import add_api_resource
|
||||
from flask import make_response
|
||||
from flask_apispec import marshal_with, doc, use_kwargs
|
||||
from project.api.resources import BaseResource
|
||||
from project.api.place.schemas import (
|
||||
PlaceSchema,
|
||||
PlacePostRequestSchema,
|
||||
PlacePatchRequestSchema,
|
||||
)
|
||||
from project.models import EventPlace
|
||||
from project.oauth2 import require_oauth
|
||||
from authlib.integrations.flask_oauth2 import current_token
|
||||
from flask import make_response
|
||||
from flask_apispec import doc, marshal_with, use_kwargs
|
||||
|
||||
from project import db
|
||||
from project.access import access_or_401, login_api_user_or_401
|
||||
from project.api import add_api_resource
|
||||
from project.api.place.schemas import (
|
||||
PlacePatchRequestSchema,
|
||||
PlacePostRequestSchema,
|
||||
PlaceSchema,
|
||||
)
|
||||
from project.api.resources import BaseResource
|
||||
from project.models import EventPlace
|
||||
from project.oauth2 import require_oauth
|
||||
|
||||
|
||||
class PlaceResource(BaseResource):
|
||||
|
||||
@ -1,22 +1,23 @@
|
||||
from marshmallow import fields, validate
|
||||
|
||||
from project.api import marshmallow
|
||||
from project.models import EventPlace
|
||||
from project.api.image.schemas import ImageSchema
|
||||
from project.api.location.schemas import (
|
||||
LocationPatchRequestSchema,
|
||||
LocationPostRequestSchema,
|
||||
LocationSchema,
|
||||
LocationSearchItemSchema,
|
||||
LocationPostRequestSchema,
|
||||
LocationPatchRequestSchema,
|
||||
)
|
||||
from project.api.organization.schemas import OrganizationRefSchema
|
||||
from project.api.schemas import (
|
||||
SQLAlchemyBaseSchema,
|
||||
IdSchemaMixin,
|
||||
WriteIdSchemaMixin,
|
||||
TrackableSchemaMixin,
|
||||
PaginationRequestSchema,
|
||||
PaginationResponseSchema,
|
||||
SQLAlchemyBaseSchema,
|
||||
TrackableSchemaMixin,
|
||||
WriteIdSchemaMixin,
|
||||
)
|
||||
from project.models import EventPlace
|
||||
|
||||
|
||||
class PlaceModelSchema(SQLAlchemyBaseSchema):
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
from functools import wraps
|
||||
|
||||
from flask import request
|
||||
from flask_apispec import marshal_with
|
||||
from flask_apispec.views import MethodResource
|
||||
from functools import wraps
|
||||
|
||||
from project import db
|
||||
from project.api.schemas import ErrorResponseSchema, UnprocessableEntityResponseSchema
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
from marshmallow import fields, missing, validate
|
||||
|
||||
from project.api import marshmallow
|
||||
from marshmallow import fields, validate, missing
|
||||
|
||||
|
||||
class SQLAlchemyBaseSchema(marshmallow.SQLAlchemySchema):
|
||||
|
||||
@ -1,28 +1,30 @@
|
||||
import click
|
||||
from flask.cli import AppGroup
|
||||
from project import app, dump_path
|
||||
from project.models import (
|
||||
Event,
|
||||
EventPlace,
|
||||
EventReference,
|
||||
Location,
|
||||
EventCategory,
|
||||
EventOrganizer,
|
||||
Image,
|
||||
AdminUnit,
|
||||
)
|
||||
from sqlalchemy.orm import joinedload
|
||||
import json
|
||||
from project.api.event.schemas import EventDumpSchema
|
||||
from project.api.place.schemas import PlaceDumpSchema
|
||||
from project.api.location.schemas import LocationDumpSchema
|
||||
from project.api.event_category.schemas import EventCategoryDumpSchema
|
||||
from project.api.organizer.schemas import OrganizerDumpSchema
|
||||
from project.api.image.schemas import ImageDumpSchema
|
||||
from project.api.organization.schemas import OrganizationDumpSchema
|
||||
from project.api.event_reference.schemas import EventReferenceDumpSchema
|
||||
import os
|
||||
import shutil
|
||||
|
||||
import click
|
||||
from flask.cli import AppGroup
|
||||
from sqlalchemy.orm import joinedload
|
||||
|
||||
from project import app, dump_path
|
||||
from project.api.event.schemas import EventDumpSchema
|
||||
from project.api.event_category.schemas import EventCategoryDumpSchema
|
||||
from project.api.event_reference.schemas import EventReferenceDumpSchema
|
||||
from project.api.image.schemas import ImageDumpSchema
|
||||
from project.api.location.schemas import LocationDumpSchema
|
||||
from project.api.organization.schemas import OrganizationDumpSchema
|
||||
from project.api.organizer.schemas import OrganizerDumpSchema
|
||||
from project.api.place.schemas import PlaceDumpSchema
|
||||
from project.models import (
|
||||
AdminUnit,
|
||||
Event,
|
||||
EventCategory,
|
||||
EventOrganizer,
|
||||
EventPlace,
|
||||
EventReference,
|
||||
Image,
|
||||
Location,
|
||||
)
|
||||
from project.utils import make_dir
|
||||
|
||||
dump_cli = AppGroup("dump")
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import click
|
||||
from flask.cli import AppGroup
|
||||
|
||||
from project import app, db
|
||||
from project.services.event import (
|
||||
get_recurring_events,
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import click
|
||||
from flask.cli import AppGroup
|
||||
|
||||
from project import app, db
|
||||
from project.services.user import add_admin_roles_to_user
|
||||
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import pytz
|
||||
from dateutil.rrule import rrulestr
|
||||
from datetime import datetime
|
||||
|
||||
import pytz
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from dateutil.rrule import rrulestr
|
||||
|
||||
berlin_tz = pytz.timezone("Europe/Berlin")
|
||||
now = datetime.now(tz=berlin_tz)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from sqlalchemy.types import TypeDecorator
|
||||
from sqlalchemy import Integer
|
||||
from sqlalchemy.types import TypeDecorator
|
||||
|
||||
|
||||
class IntegerEnum(TypeDecorator):
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from flask_babelex import lazy_gettext
|
||||
from wtforms import TextAreaField, SubmitField, BooleanField
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import BooleanField, SubmitField, TextAreaField
|
||||
from wtforms.validators import Optional
|
||||
|
||||
from project.forms.widgets import MultiCheckboxField
|
||||
|
||||
|
||||
|
||||
@ -1,16 +1,12 @@
|
||||
from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import (
|
||||
StringField,
|
||||
SubmitField,
|
||||
DecimalField,
|
||||
FormField,
|
||||
)
|
||||
from wtforms import DecimalField, FormField, StringField, SubmitField
|
||||
from wtforms.fields.html5 import EmailField, TelField, URLField
|
||||
from wtforms.validators import DataRequired, Optional, Regexp
|
||||
from wtforms.widgets.html5 import ColorInput
|
||||
from project.models import Location, Image
|
||||
|
||||
from project.forms.common import Base64ImageForm
|
||||
from project.models import Image, Location
|
||||
|
||||
|
||||
class AdminUnitLocationForm(FlaskForm):
|
||||
|
||||
@ -3,6 +3,7 @@ from flask_wtf import FlaskForm
|
||||
from wtforms import SubmitField
|
||||
from wtforms.fields.html5 import EmailField
|
||||
from wtforms.validators import DataRequired
|
||||
|
||||
from project.forms.widgets import MultiCheckboxField
|
||||
|
||||
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
import base64
|
||||
import re
|
||||
|
||||
from flask import url_for
|
||||
from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, HiddenField
|
||||
from wtforms.validators import Optional
|
||||
from markupsafe import Markup
|
||||
import re
|
||||
import base64
|
||||
from wtforms import HiddenField, StringField
|
||||
from wtforms.validators import Optional
|
||||
|
||||
|
||||
class BaseImageForm(FlaskForm):
|
||||
|
||||
@ -1,31 +1,32 @@
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from flask import request
|
||||
from flask_babelex import lazy_gettext, gettext
|
||||
from flask_babelex import gettext, lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import (
|
||||
SelectMultipleField,
|
||||
BooleanField,
|
||||
FormField,
|
||||
IntegerField,
|
||||
RadioField,
|
||||
SelectField,
|
||||
SelectMultipleField,
|
||||
StringField,
|
||||
SubmitField,
|
||||
TextAreaField,
|
||||
SelectField,
|
||||
BooleanField,
|
||||
IntegerField,
|
||||
FormField,
|
||||
)
|
||||
from wtforms.fields.html5 import EmailField, URLField
|
||||
from wtforms.validators import DataRequired, Optional
|
||||
|
||||
from project.forms.common import Base64ImageForm, event_rating_choices
|
||||
from project.forms.widgets import CustomDateField, CustomDateTimeField
|
||||
from project.models import (
|
||||
EventPlace,
|
||||
EventTargetGroupOrigin,
|
||||
EventAttendanceMode,
|
||||
EventStatus,
|
||||
Location,
|
||||
EventOrganizer,
|
||||
EventPlace,
|
||||
EventStatus,
|
||||
EventTargetGroupOrigin,
|
||||
Image,
|
||||
Location,
|
||||
)
|
||||
from project.forms.common import event_rating_choices, Base64ImageForm
|
||||
from project.forms.widgets import CustomDateTimeField, CustomDateField
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
|
||||
class EventPlaceLocationForm(FlaskForm):
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
from flask import request
|
||||
from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import (
|
||||
HiddenField,
|
||||
StringField,
|
||||
SubmitField,
|
||||
SelectField,
|
||||
)
|
||||
from wtforms import HiddenField, SelectField, StringField, SubmitField
|
||||
from wtforms.validators import Optional
|
||||
|
||||
from project.forms.common import distance_choices
|
||||
from project.forms.widgets import CustomDateField
|
||||
|
||||
|
||||
@ -1,16 +1,11 @@
|
||||
from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import (
|
||||
DecimalField,
|
||||
StringField,
|
||||
SubmitField,
|
||||
TextAreaField,
|
||||
FormField,
|
||||
)
|
||||
from wtforms import DecimalField, FormField, StringField, SubmitField, TextAreaField
|
||||
from wtforms.fields.html5 import URLField
|
||||
from wtforms.validators import DataRequired, Optional
|
||||
from project.models import Location, Image
|
||||
|
||||
from project.forms.common import Base64ImageForm
|
||||
from project.models import Image, Location
|
||||
|
||||
|
||||
class EventPlaceLocationForm(FlaskForm):
|
||||
|
||||
@ -1,23 +1,24 @@
|
||||
from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import (
|
||||
BooleanField,
|
||||
SelectField,
|
||||
SelectMultipleField,
|
||||
StringField,
|
||||
SubmitField,
|
||||
SelectField,
|
||||
BooleanField,
|
||||
)
|
||||
from wtforms.fields.html5 import EmailField, TelField
|
||||
from wtforms.validators import DataRequired, Optional
|
||||
from project.models import (
|
||||
EventRejectionReason,
|
||||
Image,
|
||||
EventTargetGroupOrigin,
|
||||
EventAttendanceMode,
|
||||
)
|
||||
|
||||
from project.forms.common import get_accept_tos_markup
|
||||
from project.forms.widgets import TagSelectField
|
||||
from project.forms.event import SharedEventForm
|
||||
from project.forms.widgets import TagSelectField
|
||||
from project.models import (
|
||||
EventAttendanceMode,
|
||||
EventRejectionReason,
|
||||
EventTargetGroupOrigin,
|
||||
Image,
|
||||
)
|
||||
|
||||
|
||||
class CreateEventSuggestionForm(SharedEventForm):
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from flask_babelex import lazy_gettext
|
||||
from wtforms import StringField, TextAreaField, SubmitField, SelectField
|
||||
from wtforms.validators import Optional, DataRequired
|
||||
from project.forms.widgets import MultiCheckboxField
|
||||
from project.api import scopes
|
||||
from project.utils import split_by_crlf
|
||||
import os
|
||||
|
||||
from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import SelectField, StringField, SubmitField, TextAreaField
|
||||
from wtforms.validators import DataRequired, Optional
|
||||
|
||||
from project.api import scopes
|
||||
from project.forms.widgets import MultiCheckboxField
|
||||
from project.utils import split_by_crlf
|
||||
|
||||
|
||||
class BaseOAuth2ClientForm(FlaskForm):
|
||||
client_name = StringField(lazy_gettext("Client name"), validators=[DataRequired()])
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import SubmitField
|
||||
|
||||
|
||||
|
||||
@ -1,15 +1,11 @@
|
||||
from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import (
|
||||
StringField,
|
||||
SubmitField,
|
||||
DecimalField,
|
||||
FormField,
|
||||
)
|
||||
from wtforms import DecimalField, FormField, StringField, SubmitField
|
||||
from wtforms.fields.html5 import EmailField, TelField, URLField
|
||||
from wtforms.validators import DataRequired, Optional
|
||||
from project.models import Location, Image
|
||||
|
||||
from project.forms.common import Base64ImageForm
|
||||
from project.models import Image, Location
|
||||
|
||||
|
||||
class OrganizerLocationForm(FlaskForm):
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import HiddenField, StringField, SubmitField, SelectField
|
||||
from wtforms import HiddenField, SelectField, StringField, SubmitField
|
||||
from wtforms.validators import Optional
|
||||
from project.forms.common import weekday_choices, distance_choices
|
||||
|
||||
from project.forms.common import distance_choices, weekday_choices
|
||||
from project.forms.widgets import CustomDateField, MultiCheckboxField
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import SelectField, StringField, SubmitField
|
||||
from wtforms.validators import DataRequired
|
||||
|
||||
from project.forms.common import event_rating_choices
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ from flask_babelex import lazy_gettext
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import SelectField, StringField, SubmitField
|
||||
from wtforms.validators import DataRequired
|
||||
|
||||
from project.forms.common import event_rating_choices
|
||||
from project.models import (
|
||||
EventReferenceRequestRejectionReason,
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
from flask_security.forms import RegisterForm, EqualTo, get_form_field_label
|
||||
from flask_babelex import lazy_gettext
|
||||
from flask_security.forms import EqualTo, RegisterForm, get_form_field_label
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import BooleanField, PasswordField, SubmitField
|
||||
from wtforms.validators import DataRequired
|
||||
|
||||
from project.forms.common import get_accept_tos_markup
|
||||
from flask_wtf import FlaskForm
|
||||
from flask_babelex import lazy_gettext
|
||||
|
||||
|
||||
class ExtendedRegisterForm(RegisterForm):
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
from wtforms import DateTimeField, SelectMultipleField, SelectField
|
||||
from wtforms.widgets import html_params, ListWidget, CheckboxInput
|
||||
from markupsafe import Markup
|
||||
from wtforms.validators import StopValidation
|
||||
from datetime import datetime
|
||||
from flask_babelex import to_user_timezone, gettext
|
||||
|
||||
from flask_babelex import gettext, to_user_timezone
|
||||
from markupsafe import Markup
|
||||
from wtforms import DateTimeField, SelectField, SelectMultipleField
|
||||
from wtforms.validators import StopValidation
|
||||
from wtforms.widgets import CheckboxInput, ListWidget, html_params
|
||||
|
||||
from project.dateutils import berlin_tz
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
from project import app, babel
|
||||
from flask_babelex import gettext
|
||||
from flask import request
|
||||
from flask_babelex import gettext
|
||||
|
||||
from project import app, babel
|
||||
|
||||
|
||||
@babel.localeselector
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
import os
|
||||
|
||||
from project import app, db
|
||||
from project.api import add_oauth2_scheme_with_transport
|
||||
from project.services.user import upsert_user_role
|
||||
from project.models import Location
|
||||
from project.services.admin_unit import upsert_admin_unit_member_role
|
||||
from project.services.event import upsert_event_category
|
||||
from project.models import Location
|
||||
import os
|
||||
from project.services.user import upsert_user_role
|
||||
|
||||
|
||||
@app.before_first_request
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
import os
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
from project import app
|
||||
from project.utils import (
|
||||
get_event_category_name,
|
||||
get_localized_enum_name,
|
||||
get_localized_scope,
|
||||
)
|
||||
from urllib.parse import quote_plus
|
||||
import os
|
||||
|
||||
|
||||
def env_override(value, key):
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import datetime
|
||||
from json import JSONEncoder
|
||||
|
||||
from flask import url_for
|
||||
from project.models import EventAttendanceMode, EventStatus
|
||||
|
||||
from project.dateutils import berlin_tz
|
||||
from project.models import EventAttendanceMode, EventStatus
|
||||
|
||||
|
||||
class DateTimeEncoder(JSONEncoder):
|
||||
|
||||
@ -1,37 +1,39 @@
|
||||
from project import db
|
||||
from project.utils import make_check_violation
|
||||
from sqlalchemy.ext.declarative import declared_attr
|
||||
from sqlalchemy.ext.hybrid import hybrid_property
|
||||
from sqlalchemy.orm import relationship, backref, deferred, object_session
|
||||
from sqlalchemy.schema import CheckConstraint
|
||||
from sqlalchemy.event import listens_for
|
||||
from sqlalchemy import (
|
||||
UniqueConstraint,
|
||||
Boolean,
|
||||
DateTime,
|
||||
Column,
|
||||
Integer,
|
||||
String,
|
||||
ForeignKey,
|
||||
Unicode,
|
||||
UnicodeText,
|
||||
Numeric,
|
||||
)
|
||||
from sqlalchemy_utils import ColorType
|
||||
from flask_security import UserMixin, RoleMixin, current_user
|
||||
from flask_dance.consumer.storage.sqla import OAuthConsumerMixin
|
||||
from enum import IntEnum
|
||||
import datetime
|
||||
from project.dbtypes import IntegerEnum
|
||||
from geoalchemy2 import Geometry
|
||||
from sqlalchemy import and_
|
||||
import time
|
||||
from enum import IntEnum
|
||||
|
||||
from authlib.integrations.sqla_oauth2 import (
|
||||
OAuth2ClientMixin,
|
||||
OAuth2AuthorizationCodeMixin,
|
||||
OAuth2ClientMixin,
|
||||
OAuth2TokenMixin,
|
||||
)
|
||||
import time
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from flask_dance.consumer.storage.sqla import OAuthConsumerMixin
|
||||
from flask_security import RoleMixin, UserMixin, current_user
|
||||
from geoalchemy2 import Geometry
|
||||
from sqlalchemy import (
|
||||
Boolean,
|
||||
Column,
|
||||
DateTime,
|
||||
ForeignKey,
|
||||
Integer,
|
||||
Numeric,
|
||||
String,
|
||||
Unicode,
|
||||
UnicodeText,
|
||||
UniqueConstraint,
|
||||
and_,
|
||||
)
|
||||
from sqlalchemy.event import listens_for
|
||||
from sqlalchemy.ext.declarative import declared_attr
|
||||
from sqlalchemy.ext.hybrid import hybrid_property
|
||||
from sqlalchemy.orm import backref, deferred, object_session, relationship
|
||||
from sqlalchemy.schema import CheckConstraint
|
||||
from sqlalchemy_utils import ColorType
|
||||
|
||||
from project import db
|
||||
from project.dbtypes import IntegerEnum
|
||||
from project.utils import make_check_violation
|
||||
|
||||
# Base
|
||||
|
||||
|
||||
@ -1,17 +1,15 @@
|
||||
from authlib.integrations.flask_oauth2 import (
|
||||
AuthorizationServer,
|
||||
ResourceProtector,
|
||||
)
|
||||
from authlib.integrations.flask_oauth2 import AuthorizationServer, ResourceProtector
|
||||
from authlib.integrations.sqla_oauth2 import (
|
||||
create_query_client_func,
|
||||
create_save_token_func,
|
||||
create_bearer_token_validator,
|
||||
create_query_client_func,
|
||||
create_query_token_func,
|
||||
create_save_token_func,
|
||||
)
|
||||
from authlib.oauth2.rfc6749 import grants
|
||||
from authlib.oauth2.rfc7636 import CodeChallenge
|
||||
|
||||
from project import db
|
||||
from project.models import User, OAuth2Client, OAuth2AuthorizationCode, OAuth2Token
|
||||
from project.models import OAuth2AuthorizationCode, OAuth2Client, OAuth2Token, User
|
||||
|
||||
|
||||
class AuthorizationCodeGrant(grants.AuthorizationCodeGrant):
|
||||
|
||||
@ -1,16 +1,17 @@
|
||||
from sqlalchemy import and_, func, or_
|
||||
|
||||
from project import db
|
||||
from project.models import (
|
||||
AdminUnit,
|
||||
AdminUnitMember,
|
||||
AdminUnitMemberRole,
|
||||
AdminUnitMemberInvitation,
|
||||
AdminUnitMemberRole,
|
||||
EventOrganizer,
|
||||
EventPlace,
|
||||
Location,
|
||||
)
|
||||
from project.services.location import assign_location_values
|
||||
from project.services.image import upsert_image_with_data
|
||||
from sqlalchemy import func, and_, or_
|
||||
from project.services.location import assign_location_values
|
||||
|
||||
|
||||
def insert_admin_unit_for_user(admin_unit, user):
|
||||
|
||||
@ -1,24 +1,21 @@
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from sqlalchemy import and_, func, or_
|
||||
from sqlalchemy.orm import contains_eager, defaultload, joinedload
|
||||
from sqlalchemy.sql import extract
|
||||
|
||||
from project import db
|
||||
from project.dateutils import date_add_time, dates_from_recurrence_rule, today
|
||||
from project.models import (
|
||||
AdminUnit,
|
||||
EventCategory,
|
||||
Event,
|
||||
EventCategory,
|
||||
EventDate,
|
||||
EventOrganizer,
|
||||
EventReference,
|
||||
EventPlace,
|
||||
EventReference,
|
||||
Image,
|
||||
Location,
|
||||
)
|
||||
from project.dateutils import (
|
||||
dates_from_recurrence_rule,
|
||||
today,
|
||||
date_add_time,
|
||||
)
|
||||
from sqlalchemy import and_, or_, func
|
||||
from sqlalchemy.sql import extract
|
||||
from sqlalchemy.orm import joinedload, contains_eager, defaultload
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
|
||||
def get_event_category(category_name):
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user