From 406d8f4d2f44ca994d52e6d6d0ec16fdf61807cb Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Tue, 21 Mar 2023 23:54:51 +0100 Subject: [PATCH] Renaming #384 --- .github/workflows/cypress.yml | 12 ++++++------ .github/workflows/docker-build-push.yml | 2 +- .github/workflows/test.yml | 4 ++-- README.md | 2 +- cypress/e2e/user.cy.js | 4 ++-- deployment/docker-compose/.env.example | 4 ++-- deployment/docker-compose/docker-compose.yml | 4 ++-- deployment/docker-compose/nginx.config.example | 14 +++++++------- doc/deployment.md | 6 +++--- doc/development.md | 8 ++++---- docker-compose.yml | 12 ++++++------ package-lock.json | 4 ++-- package.json | 10 +++++----- project/__init__.py | 4 ++-- project/cli/test.py | 4 ++-- project/dateutils.py | 2 +- project/static/site.js | 16 ++++++++-------- project/static/vue/organization/read.vue.js | 4 ++-- .../vue/widget-configurator/configurator.vue.js | 12 ++++++------ .../static/vue/widget-configurator/list.vue.js | 4 ++-- project/static/widget-loader.js | 12 ++++++------ project/static/widget/calendar.html | 4 ++-- project/static/widget/search.html | 6 +++--- project/templates/_macros.html | 4 ++-- project/templates/layout.html | 2 +- project/templates/manage/widgets.html | 8 ++++---- project/templates/widget/event_date/list.html | 2 +- tests/api/test_organization.py | 8 ++++---- tests/conftest.py | 2 +- tests/seeder.py | 14 +++++++------- tests/views/test_app.py | 2 +- 31 files changed, 98 insertions(+), 98 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 7d77e90..3c2f2f5 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -27,7 +27,7 @@ jobs: env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres - POSTGRES_DB: gsevpt_tests + POSTGRES_DB: eventcally_tests # Set health checks to wait until postgres has started options: >- --health-cmd pg_isready @@ -58,7 +58,7 @@ jobs: flask test seed gunicorn -b 127.0.0.1:5001 -w 1 project:app --daemon env: - DATABASE_URL: postgresql://postgres:postgres@localhost/gsevpt_tests + DATABASE_URL: postgresql://postgres:postgres@localhost/eventcally_tests TESTING: 1 AUTHLIB_INSECURE_TRANSPORT: 1 JWT_PRIVATE_KEY: '-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAxMl+DFiwhnoWRiVPcEIstAW66VY39JNo1TG1U10OfaFMuWI8\njcq5VfSRPBdXLRqAJwZi4CZCwOglEvURArf1QTxVBdLpDW75tD6fNOHaHKvX5WPR\nMGC/7Rfo9K/OgEWnQplc/0Me9D8MzTpIA56Uo/H/DE82kGWOMcWdqIA40pHaCZ7i\nWIoD7pS6DcRDt/8o0+IQqhMC4SrjL2HelzXHpg4glgY+GLbvTPOfV/OlFCAWDK3o\nN3wMBYS+TFP2Q/5pXfPCajIrSfF7dHyZU2d/K26A8naKcSUYuJzA8GBXkPx8YObt\nOS5SYYeD5GeGsX3IsVVyk3WqMVN7NXvRqmNjqQIDAQABAoIBABYoJbQYLFAH4Qgm\n3UnjeYsPdhsdpRE5o70VargnKyGEDtJ0uCKy56lA7zVX323ppPI/6tQYGr4DpWD8\nDN1Efy3IMD6Gn8zuaNkdj+lxYJCH3LgsQ/pxekqkvYsHXHXe4dVC1VC8avjPPI7C\n+CbILS5EahYluRwLAzahbH3zafJzXK6qxVCaPBn1QAG/b5FhGCoSSmar+6gxypX1\nIt977gMaZ9sbaRCfQ2BYEeRyWcBvPPWnM1q87Q/s4dFcHplE6ADLtTOAtFzwKne+\n0jP8AvcnQ6/vG7lM7epUfZLyPRt+79PIAj1ndtff10vGwVwoVuhGuwumIp7vMxQq\nF8VC5o0CgYEA/escZHgN25mrUlKhaGWmtxIfqreaLKjCc/mc1pMEfnMAVgrcVUu4\nMiAx6/k6o9CUrPtNUuKktAuAZMAN505it2k9wjwmu+snfgwj2oMKHGsss9yJ19Fc\nlKdoHE4QeHMQWnIqqN/lRza/tfUPlMDLY04gxMZR1R7Y7L2Hf2aLxQMCgYEAxmZ7\najpJResNEiSxFldImwBLjuLhqvOzPYDsqBpwB0gQOJtbKuPPzKB6J8guXVi+DHDz\neTKOAm3BQymb2xRuyvrclFi4a1LWFWsTz+PAMXss2h+TjGm1dkAYt/FiSqyuyLY5\n48igJjdH64G2M4w8eN0YUtKvQRqaZ37jFMbR5uMCgYEAkONbrCilH62sCKmF2KBI\nZSY+U5e4rcsOSkcgq3/wjIbqpi5EU5eFX3Tnh5MLVvZqH9q14JnbCbGWbeb5CAe+\nZJH036SbJZelTVN4EfO8DUNKmsc5EKEyhtCPo7cXxuNBbZq/pOU9W0luU1Gmtmbc\np6mpIR9ZCpcziMMNUjEdiCkCgYB8aoP2Z7rPd8lomU3cHrxPR24amri9xbmfVhwS\nhxG93zkc5n/Tc606O2CfVe+NZjs3/hUQ6d0YNM+/WHZ+el/INmzhMonj87yBDfcM\npVw/K2lDGA4lPZ0oHKXjpCHphkTNZUkESSn1DTGyxFMIHGdHvA6m0axJfW9ae73X\np5611QKBgQC/wOD9Wv6IQLR7f5GQSXrlmiCGmUugd3BG7UXrevYzbm48ePyIIa+e\nPaSvTkZR5Ji5XvajSDhYK1/2qmozk6B1pH1M4jqKD80zZOq8mc9q8lZ9fEIxi5wz\nPVHRdVKT+wEsbeQhxqX/RfaqIi1UcBmwhnZKXutXPon/ZIg7iVoo5g==\n-----END RSA PRIVATE KEY-----\n' @@ -75,7 +75,7 @@ jobs: config-file: cypress/config/mobile.config.js config: baseUrl=http://127.0.0.1:5001 env: - DATABASE_URL: postgresql://postgres:postgres@localhost/gsevpt_tests + DATABASE_URL: postgresql://postgres:postgres@localhost/eventcally_tests TESTING: 1 CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} @@ -101,7 +101,7 @@ jobs: env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres - POSTGRES_DB: gsevpt_tests + POSTGRES_DB: eventcally_tests # Set health checks to wait until postgres has started options: >- --health-cmd pg_isready @@ -132,7 +132,7 @@ jobs: flask test seed gunicorn -b 127.0.0.1:5001 -w 1 project:app --daemon env: - DATABASE_URL: postgresql://postgres:postgres@localhost/gsevpt_tests + DATABASE_URL: postgresql://postgres:postgres@localhost/eventcally_tests TESTING: 1 AUTHLIB_INSECURE_TRANSPORT: 1 JWT_PRIVATE_KEY: '-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAxMl+DFiwhnoWRiVPcEIstAW66VY39JNo1TG1U10OfaFMuWI8\njcq5VfSRPBdXLRqAJwZi4CZCwOglEvURArf1QTxVBdLpDW75tD6fNOHaHKvX5WPR\nMGC/7Rfo9K/OgEWnQplc/0Me9D8MzTpIA56Uo/H/DE82kGWOMcWdqIA40pHaCZ7i\nWIoD7pS6DcRDt/8o0+IQqhMC4SrjL2HelzXHpg4glgY+GLbvTPOfV/OlFCAWDK3o\nN3wMBYS+TFP2Q/5pXfPCajIrSfF7dHyZU2d/K26A8naKcSUYuJzA8GBXkPx8YObt\nOS5SYYeD5GeGsX3IsVVyk3WqMVN7NXvRqmNjqQIDAQABAoIBABYoJbQYLFAH4Qgm\n3UnjeYsPdhsdpRE5o70VargnKyGEDtJ0uCKy56lA7zVX323ppPI/6tQYGr4DpWD8\nDN1Efy3IMD6Gn8zuaNkdj+lxYJCH3LgsQ/pxekqkvYsHXHXe4dVC1VC8avjPPI7C\n+CbILS5EahYluRwLAzahbH3zafJzXK6qxVCaPBn1QAG/b5FhGCoSSmar+6gxypX1\nIt977gMaZ9sbaRCfQ2BYEeRyWcBvPPWnM1q87Q/s4dFcHplE6ADLtTOAtFzwKne+\n0jP8AvcnQ6/vG7lM7epUfZLyPRt+79PIAj1ndtff10vGwVwoVuhGuwumIp7vMxQq\nF8VC5o0CgYEA/escZHgN25mrUlKhaGWmtxIfqreaLKjCc/mc1pMEfnMAVgrcVUu4\nMiAx6/k6o9CUrPtNUuKktAuAZMAN505it2k9wjwmu+snfgwj2oMKHGsss9yJ19Fc\nlKdoHE4QeHMQWnIqqN/lRza/tfUPlMDLY04gxMZR1R7Y7L2Hf2aLxQMCgYEAxmZ7\najpJResNEiSxFldImwBLjuLhqvOzPYDsqBpwB0gQOJtbKuPPzKB6J8guXVi+DHDz\neTKOAm3BQymb2xRuyvrclFi4a1LWFWsTz+PAMXss2h+TjGm1dkAYt/FiSqyuyLY5\n48igJjdH64G2M4w8eN0YUtKvQRqaZ37jFMbR5uMCgYEAkONbrCilH62sCKmF2KBI\nZSY+U5e4rcsOSkcgq3/wjIbqpi5EU5eFX3Tnh5MLVvZqH9q14JnbCbGWbeb5CAe+\nZJH036SbJZelTVN4EfO8DUNKmsc5EKEyhtCPo7cXxuNBbZq/pOU9W0luU1Gmtmbc\np6mpIR9ZCpcziMMNUjEdiCkCgYB8aoP2Z7rPd8lomU3cHrxPR24amri9xbmfVhwS\nhxG93zkc5n/Tc606O2CfVe+NZjs3/hUQ6d0YNM+/WHZ+el/INmzhMonj87yBDfcM\npVw/K2lDGA4lPZ0oHKXjpCHphkTNZUkESSn1DTGyxFMIHGdHvA6m0axJfW9ae73X\np5611QKBgQC/wOD9Wv6IQLR7f5GQSXrlmiCGmUugd3BG7UXrevYzbm48ePyIIa+e\nPaSvTkZR5Ji5XvajSDhYK1/2qmozk6B1pH1M4jqKD80zZOq8mc9q8lZ9fEIxi5wz\nPVHRdVKT+wEsbeQhxqX/RfaqIi1UcBmwhnZKXutXPon/ZIg7iVoo5g==\n-----END RSA PRIVATE KEY-----\n' @@ -149,7 +149,7 @@ jobs: config-file: cypress/config/desktop.config.js config: baseUrl=http://127.0.0.1:5001 env: - DATABASE_URL: postgresql://postgres:postgres@localhost/gsevpt_tests + DATABASE_URL: postgresql://postgres:postgres@localhost/eventcally_tests TESTING: 1 CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 746ae75..776e676 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -17,7 +17,7 @@ jobs: id: docker_meta uses: crazy-max/ghaction-docker-meta@v1 with: - images: danielgrams/gsevpt + images: eventcally/eventcally tag-semver: | {{version}} {{major}}.{{minor}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b9eaf73..3908a2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres - POSTGRES_DB: gsevpt_tests + POSTGRES_DB: eventcally_tests # Set health checks to wait until postgres has started options: >- --health-cmd pg_isready @@ -52,7 +52,7 @@ jobs: - name: Run tests run: pytest --cov=project --splits 4 --group ${{ matrix.group }} env: - TEST_DATABASE_URL: postgresql://postgres:postgres@localhost/gsevpt_tests + TEST_DATABASE_URL: postgresql://postgres:postgres@localhost/eventcally_tests - name: Upload coverage uses: actions/upload-artifact@v2 diff --git a/README.md b/README.md index 179c438..7f2241e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Open Event Database -![Tests](https://github.com/DanielGrams/gsevpt/workflows/Tests/badge.svg) [![codecov](https://codecov.io/gh/DanielGrams/gsevpt/branch/main/graph/badge.svg?token=66CLLWWV7Y)](https://codecov.io/gh/DanielGrams/gsevpt) [![Cypress](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/32g194/main&style=flat&logo=cypress)](https://dashboard.cypress.io/projects/32g194/runs) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) ![Docker Pulls](https://img.shields.io/docker/pulls/danielgrams/gsevpt) +![Tests](https://github.com/eventcally/eventcally/workflows/Tests/badge.svg) [![codecov](https://codecov.io/gh/eventcally/eventcally/branch/main/graph/badge.svg?token=66CLLWWV7Y)](https://codecov.io/gh/eventcally/eventcally) [![Cypress](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/32g194/main&style=flat&logo=cypress)](https://dashboard.cypress.io/projects/32g194/runs) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) ![Docker Pulls](https://img.shields.io/docker/pulls/eventcally/eventcally) Event website using Python, Flask and Postgres. diff --git a/cypress/e2e/user.cy.js b/cypress/e2e/user.cy.js index 6b6304f..18cb3ec 100644 --- a/cypress/e2e/user.cy.js +++ b/cypress/e2e/user.cy.js @@ -30,7 +30,7 @@ describe("User", () => { cy.get("#password").type("short"); cy.assertInvalid("password", "Geben Sie bitte mindestens 8 Zeichen ein."); - cy.get("#password").clear().type("ilovegsevpt"); + cy.get("#password").clear().type("iloveeventcally"); cy.assertValid("password"); // Confirm password @@ -40,7 +40,7 @@ describe("User", () => { "Wiederholen Sie bitte denselben Wert." ); - cy.get("#password_confirm").clear().type("ilovegsevpt"); + cy.get("#password_confirm").clear().type("iloveeventcally"); cy.assertValid("password_confirm"); // Submit diff --git a/deployment/docker-compose/.env.example b/deployment/docker-compose/.env.example index ff70286..ab1d074 100644 --- a/deployment/docker-compose/.env.example +++ b/deployment/docker-compose/.env.example @@ -7,9 +7,9 @@ FLUENTD_LOG_PATH=./tmp/logs/fluentd FLUENTD_CUSTOM_CONFIG_PATH=./tmp/config FLUENTD_DOCKER_CONTAINERS_PATH=/var/lib/docker/containers -POSTGRES_USER=gsevpt +POSTGRES_USER=eventcally POSTGRES_PASSWORD= -POSTGRES_DB=gsevpt +POSTGRES_DB=eventcally REDIS_PASSWORD= WEB_TAG=latest diff --git a/deployment/docker-compose/docker-compose.yml b/deployment/docker-compose/docker-compose.yml index 6bbf774..ce20ce9 100644 --- a/deployment/docker-compose/docker-compose.yml +++ b/deployment/docker-compose/docker-compose.yml @@ -1,5 +1,5 @@ version: "3.9" -name: "gsevpt" +name: "eventcally" x-web-env: &default-web-env @@ -27,7 +27,7 @@ x-web-env: x-web: &default-web - image: danielgrams/gsevpt:${WEB_TAG} + image: eventcally/eventcally:${WEB_TAG} restart: always extra_hosts: - "host.docker.internal:host-gateway" diff --git a/deployment/docker-compose/nginx.config.example b/deployment/docker-compose/nginx.config.example index a060bf7..e56183b 100644 --- a/deployment/docker-compose/nginx.config.example +++ b/deployment/docker-compose/nginx.config.example @@ -3,11 +3,11 @@ http { server { listen 80 default_server; listen [::]:80 default_server; - root /var/www/vhosts/gsevpt.de; + root /var/www/vhosts/eventcally.de; server_name _; location ^~ /image/ { - root "/var/www/vhosts/gsevpt.de/cache/img"; + root "/var/www/vhosts/eventcally.de/cache/img"; expires 1h; location ~ ^/image/(?[0-9]+)/(?[0-9]+) { @@ -25,23 +25,23 @@ http { } } location ^~ /static/ { - root "/var/www/vhosts/gsevpt.de/"; + root "/var/www/vhosts/eventcally.de/"; location ~ ^/static/(.*)$ { try_files /static-custom/$1 /static/$1 @docker; } } location ^~ /dump/ { - alias "/var/www/vhosts/gsevpt.de/cache/dump/"; + alias "/var/www/vhosts/eventcally.de/cache/dump/"; } location ^~ /sitemap.xml { - alias "/var/www/vhosts/gsevpt.de/cache/sitemap.xml"; + alias "/var/www/vhosts/eventcally.de/cache/sitemap.xml"; } location ^~ /robots.txt { - alias "/var/www/vhosts/gsevpt.de/cache/robots.txt"; + alias "/var/www/vhosts/eventcally.de/cache/robots.txt"; } location ^~ /favicon.ico { - alias "/var/www/vhosts/gsevpt.de/static/favicon.ico"; + alias "/var/www/vhosts/eventcally.de/static/favicon.ico"; expires 12h; } location @docker { diff --git a/doc/deployment.md b/doc/deployment.md index 9828e46..614f72e 100644 --- a/doc/deployment.md +++ b/doc/deployment.md @@ -7,7 +7,7 @@ ## Docker ```sh -docker run -p 5000:5000 -e "DATABASE_URL=postgresql://postgres@localhost/gsevpt" danielgrams/gsevpt:latest +docker run -p 5000:5000 -e "DATABASE_URL=postgresql://postgres@localhost/eventcally" eventcally/eventcally:latest ``` ## Manual Installation @@ -21,7 +21,7 @@ docker run -p 5000:5000 -e "DATABASE_URL=postgresql://postgres@localhost/gsevpt" ### Create database ```sh -psql -c 'create database gsevpt;' -U postgres +psql -c 'create database eventcally;' -U postgres ``` ### Install and run @@ -30,7 +30,7 @@ psql -c 'create database gsevpt;' -U postgres python3 -m venv venv source venv/bin/activate (venv) pip install -r requirements.txt -(venv) export DATABASE_URL='postgresql://postgres@localhost/gsevpt' +(venv) export DATABASE_URL='postgresql://postgres@localhost/eventcally' (venv) flask db upgrade (venv) gunicorn -c gunicorn.conf.py project:app ``` diff --git a/doc/development.md b/doc/development.md index 5f9dbdf..15c1ceb 100644 --- a/doc/development.md +++ b/doc/development.md @@ -5,8 +5,8 @@ ### Create test database ```sh -psql -c 'create database gsevpt_tests;' -U postgres -psql -c 'create extension postgis;' -d gsevpt_tests -U postgres +psql -c 'create database eventcally_tests;' -U postgres +psql -c 'create extension postgis;' -d eventcally_tests -U postgres ``` ### Run tests @@ -68,13 +68,13 @@ pybabel compile -d project/translations ### Build image ```sh -docker build -t danielgrams/gsevpt:latest . +docker build -t eventcally/eventcally:latest . ``` ### Run container with existing postgres server ```sh -docker run -p 5000:5000 -e "DATABASE_URL=postgresql://postgres@host.docker.internal/gsevpt" danielgrams/gsevpt:latest +docker run -p 5000:5000 -e "DATABASE_URL=postgresql://postgres@host.docker.internal/eventcally" eventcally/eventcally:latest ``` ### Compose (including dependencies) diff --git a/docker-compose.yml b/docker-compose.yml index 861f900..f077b50 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,12 @@ version: "3.9" -name: "gsevpt-dev" +name: "eventcally-dev" x-web-env: &default-web-env FLASK_APP: main.py - DATABASE_URL: postgresql://gsevpt:pass@db/gsevpt + DATABASE_URL: postgresql://eventcally:pass@db/eventcally REDIS_URL: redis://default:pass@redis - MAIL_DEFAULT_SENDER: noresponse@gsevpt.de + MAIL_DEFAULT_SENDER: noresponse@eventcally.de MAIL_SERVER: mailhog MAIL_PORT: 1025 MAIL_USE_TLS: False @@ -32,11 +32,11 @@ services: db: image: postgis/postgis:12-3.1 healthcheck: - test: "pg_isready --username=gsevpt && psql --username=gsevpt --list" + test: "pg_isready --username=eventcally && psql --username=eventcally --list" start_period: "5s" environment: - - POSTGRES_DB=gsevpt - - POSTGRES_USER=gsevpt + - POSTGRES_DB=eventcally + - POSTGRES_USER=eventcally - POSTGRES_PASSWORD=pass redis: diff --git a/package-lock.json b/package-lock.json index c2b1e12..4f9d6a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "gsevpt", + "name": "eventcally", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "gsevpt", + "name": "eventcally", "version": "1.0.0", "license": "ISC", "devDependencies": { diff --git a/package.json b/package.json index 455c344..4276938 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "gsevpt", + "name": "eventcally", "version": "1.0.0", - "description": "![Tests](https://github.com/DanielGrams/gsevpt/workflows/Tests/badge.svg) [![codecov](https://codecov.io/gh/DanielGrams/gsevpt/branch/main/graph/badge.svg?token=66CLLWWV7Y)](https://codecov.io/gh/DanielGrams/gsevpt) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) ![Docker Pulls](https://img.shields.io/docker/pulls/danielgrams/gsevpt)", + "description": "Open event database", "main": "index.js", "directories": { "doc": "doc", @@ -13,14 +13,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/DanielGrams/gsevpt.git" + "url": "git+https://github.com/eventcally/eventcally.git" }, "author": "", "license": "ISC", "bugs": { - "url": "https://github.com/DanielGrams/gsevpt/issues" + "url": "https://github.com/eventcally/eventcally/issues" }, - "homepage": "https://github.com/DanielGrams/gsevpt#readme", + "homepage": "https://github.com/eventcally/eventcally#readme", "devDependencies": { "cd": "^0.3.3", "cypress": "^12.8.1", diff --git a/project/__init__.py b/project/__init__.py index 862319b..8d329a4 100644 --- a/project/__init__.py +++ b/project/__init__.py @@ -34,7 +34,7 @@ app.config["SECURITY_RECOVERABLE"] = True app.config["SECURITY_CHANGEABLE"] = True app.config["SECURITY_EMAIL_SENDER"] = os.getenv("MAIL_DEFAULT_SENDER") app.config["LANGUAGES"] = ["en", "de"] -app.config["SITE_NAME"] = os.getenv("SITE_NAME", "gsevpt") +app.config["SITE_NAME"] = os.getenv("SITE_NAME", "eventcally") app.config["SERVER_NAME"] = os.getenv("SERVER_NAME") app.config["DOCS_URL"] = os.getenv("DOCS_URL") app.config["ADMIN_UNIT_CREATE_REQUIRES_ADMIN"] = os.getenv( @@ -141,7 +141,7 @@ mail_server = os.getenv("MAIL_SERVER") if not mail_server: app.config["MAIL_SUPPRESS_SEND"] = True - app.config["MAIL_DEFAULT_SENDER"] = "test@gsevpt.de" + app.config["MAIL_DEFAULT_SENDER"] = "test@eventcally.de" else: # pragma: no cover app.config["MAIL_SUPPRESS_SEND"] = False app.config["MAIL_SERVER"] = mail_server diff --git a/project/cli/test.py b/project/cli/test.py index 49770ad..efb3f42 100644 --- a/project/cli/test.py +++ b/project/cli/test.py @@ -115,13 +115,13 @@ def seed(): def _verify_admin_unit(admin_unit_id): from project.services.admin_unit import get_admin_unit_by_name - other_admin_unit = get_admin_unit_by_name("gsevpt") + other_admin_unit = get_admin_unit_by_name("eventcally") if other_admin_unit: other_admin_unit_id = other_admin_unit.id else: other_user_id = _create_user("unverified@test.de") - other_admin_unit_id = _create_admin_unit(other_user_id, "gsevpt") + other_admin_unit_id = _create_admin_unit(other_user_id, "eventcally") _create_admin_unit_relation( other_admin_unit_id, diff --git a/project/dateutils.py b/project/dateutils.py index aad8853..b1ca7bf 100644 --- a/project/dateutils.py +++ b/project/dateutils.py @@ -232,7 +232,7 @@ def calculate_occurrences(start_date, date_format, rrule_str, start, batch_size) def create_icalendar() -> icalendar.Calendar: cal = icalendar.Calendar() - cal.add("prodid", "-//gsevpt//github.com/DanielGrams/gsevpt//") + cal.add("prodid", "-//eventcally//github.com/eventcally/eventcally//") cal.add("version", "2.0") cal.add("x-wr-timezone", berlin_tz.zone) diff --git a/project/static/site.js b/project/static/site.js index 08eb804..40dca7d 100644 --- a/project/static/site.js +++ b/project/static/site.js @@ -353,7 +353,7 @@ function scroll_to_element(element, complete) { } (function($) { - function GsevptDateDefinition(element, options) { + function EventCallyDateDefinition(element, options) { var self = this; var container = $(element); var prefix = container.attr('data-prefix'); @@ -434,22 +434,22 @@ function scroll_to_element(element, complete) { }); } - $.fn.gsevptDateDefinition = function(options) { + $.fn.eventcallyDateDefinition = function(options) { var defaults = {}; var settings = $.extend({}, defaults, options); if (this.length > 1) { - this.each(function() { $(this).gsevptDateDefinition(options) }); + this.each(function() { $(this).eventcallyDateDefinition(options) }); return this; } - if (this.data('gsevptDateDefinition')) { - return this.data('gsevptDateDefinition'); + if (this.data('eventcallyDateDefinition')) { + return this.data('eventcallyDateDefinition'); } - var gsevptDateDefinition = new GsevptDateDefinition(this, settings); - this.data('gsevptDateDefinition', gsevptDateDefinition); - return gsevptDateDefinition; + var eventcallyDateDefinition = new EventCallyDateDefinition(this, settings); + this.data('eventcallyDateDefinition', eventcallyDateDefinition); + return eventcallyDateDefinition; } })(jQuery); diff --git a/project/static/vue/organization/read.vue.js b/project/static/vue/organization/read.vue.js index 43353d2..983e47c 100644 --- a/project/static/vue/organization/read.vue.js +++ b/project/static/vue/organization/read.vue.js @@ -42,7 +42,7 @@ const OrganizationRead = {
- +
@@ -72,7 +72,7 @@ const OrganizationRead = { .then((response) => { this.organization = response.data; Vue.nextTick(function () { - iFrameResize({ minHeight: 300, onMessage: function(m) {} }, '#gsevpt-widget'); + iFrameResize({ minHeight: 300, onMessage: function(m) {} }, '#eventcally-widget'); }); }); }, diff --git a/project/static/vue/widget-configurator/configurator.vue.js b/project/static/vue/widget-configurator/configurator.vue.js index ee09f86..bcbac05 100644 --- a/project/static/vue/widget-configurator/configurator.vue.js +++ b/project/static/vue/widget-configurator/configurator.vue.js @@ -53,8 +53,8 @@ const WidgetConfigurator = { {{ $t("comp.search.pagination") }} - - {{ $t("comp.search.showGsevptLink") }} + + {{ $t("comp.search.showEventCallyLink") }} {{ $t("comp.search.printButton") }} @@ -264,7 +264,7 @@ const WidgetConfigurator = { eventListId: "Event list", view: "Display", showFilter: "Filter", - showGsevptLink: "Link", + showEventCallyLink: "Link", layout: "Layout", eventsPerPage: "Events per page", event: "Event", @@ -310,7 +310,7 @@ const WidgetConfigurator = { eventListId: "Veranstaltungsliste", view: "Anzeige", showFilter: "Filter", - showGsevptLink: "Link", + showEventCallyLink: "Link", layout: "Layout", eventsPerPage: "Events pro Seite", event: "Event", @@ -354,7 +354,7 @@ const WidgetConfigurator = { showFilter: true, showPagination: true, showPrintButton: false, - showGsevptLink: true, + showEventCallyLink: true, fontFamily: "", background: "#ffffff", textColor: "#212529", @@ -498,7 +498,7 @@ const WidgetConfigurator = { return; } - resizer.sendMessage({'type': 'GSEVPT_WIDGET_SETTINGS_UPDATE_EVENT', 'data': this.settings}); + resizer.sendMessage({'type': 'EVENTCALLY_WIDGET_SETTINGS_UPDATE_EVENT', 'data': this.settings}); }, resizePreview() { const resizer = this.$refs.previewIframe.iFrameResizer; diff --git a/project/static/vue/widget-configurator/list.vue.js b/project/static/vue/widget-configurator/list.vue.js index 79fdfda..1a29683 100644 --- a/project/static/vue/widget-configurator/list.vue.js +++ b/project/static/vue/widget-configurator/list.vue.js @@ -104,10 +104,10 @@ const WidgetConfiguratorList = { return this.$route.params.organization_id; }, installationHeader() { - return "\n\n"; + return "\n\n"; }, installationBody() { - return '
'; + return '
'; } }, mounted() { diff --git a/project/static/widget-loader.js b/project/static/widget-loader.js index f75bd1b..2a43e23 100644 --- a/project/static/widget-loader.js +++ b/project/static/widget-loader.js @@ -15,7 +15,7 @@ }; function initWidgets() { - var elements = d.getElementsByClassName("gsevpt-widget"); + var elements = d.getElementsByClassName("eventcally-widget"); for (var i = 0; i < elements.length; i++) { initIframeWidget(elements.item(i), i); } @@ -79,8 +79,8 @@ } var iFrame = d.createElement("iframe"); - iFrame.id = "gsevpt-widget-iframe-" + index; - iFrame.class = "gsevpt-widget-iframe"; + iFrame.id = "eventcally-widget-iframe-" + index; + iFrame.class = "eventcally-widget-iframe"; iFrame.src = src; iFrame.style = style; iFrame.frameborder = "0"; @@ -172,7 +172,7 @@ (function(data) { config.onInit = function (iFrame) { - iFrame.iFrameResizer.sendMessage({'type': 'gsevpt_WIDGET_SETTINGS_UPDATE_EVENT', 'data': data}); + iFrame.iFrameResizer.sendMessage({'type': 'EVENTCALLY_WIDGET_SETTINGS_UPDATE_EVENT', 'data': data}); } })(container.customWidgetData.settings); } @@ -185,14 +185,14 @@ function onIframeMessage(messageData, googleTagManager) { var message = messageData.message; - if (message.type == "gsevpt_ANALYTICS_EVENT") { + if (message.type == "EVENTCALLY_ANALYTICS_EVENT") { trackAnalyticsEvent(message.data, googleTagManager); } } function trackAnalyticsEvent(data, googleTagManager) { if (googleTagManager) { - data.event = "gsevptWidget." + data.event; + data.event = "eventcallyWidget." + data.event; if (window.dataLayer !== null && window.dataLayer !== undefined) { window.dataLayer.push(data); diff --git a/project/static/widget/calendar.html b/project/static/widget/calendar.html index fce8b58..c0d16a4 100644 --- a/project/static/widget/calendar.html +++ b/project/static/widget/calendar.html @@ -242,7 +242,7 @@ Vue.component('event-warning-pills', { }, trackAnalyticsEvent(data) { if ('parentIFrame' in window) { - parentIFrame.sendMessage({'type': 'GSEVPT_ANALYTICS_EVENT', 'data': data}); + parentIFrame.sendMessage({'type': 'EVENTCALLY_ANALYTICS_EVENT', 'data': data}); } } } @@ -253,7 +253,7 @@ Vue.component('event-warning-pills', { app.trackAnalyticsEvent({'event':'pageView', 'url':document.location.href}); }, onMessage: function(message) { - if (message.type != 'GSEVPT_WIDGET_SETTINGS_UPDATE_EVENT') { + if (message.type != 'EVENTCALLY_WIDGET_SETTINGS_UPDATE_EVENT') { return; } diff --git a/project/static/widget/search.html b/project/static/widget/search.html index 23fceb8..cf11dd1 100644 --- a/project/static/widget/search.html +++ b/project/static/widget/search.html @@ -219,7 +219,7 @@ >
-
+ @@ -491,7 +491,7 @@ var app = new Vue({ }, trackAnalyticsEvent(data) { if ('parentIFrame' in window) { - parentIFrame.sendMessage({'type': 'GSEVPT_ANALYTICS_EVENT', 'data': data}); + parentIFrame.sendMessage({'type': 'EVENTCALLY_ANALYTICS_EVENT', 'data': data}); } }, updateSettings(settings) { @@ -511,7 +511,7 @@ window.iFrameResizer = { app.trackAnalyticsEvent({'event':'pageView', 'url':document.location.href}); }, onMessage: function(message) { - if (message.type != 'GSEVPT_WIDGET_SETTINGS_UPDATE_EVENT') { + if (message.type != 'EVENTCALLY_WIDGET_SETTINGS_UPDATE_EVENT') { return; } diff --git a/project/templates/_macros.html b/project/templates/_macros.html index 300c9ea..d535743 100644 --- a/project/templates/_macros.html +++ b/project/templates/_macros.html @@ -1658,7 +1658,7 @@ $('#allday').on('change', function() { {% endmacro %} {% macro render_event_date_defintion_code() %} - $('.date-definition-container').gsevptDateDefinition(); + $('.date-definition-container').eventcallyDateDefinition(); var min_date_definition_index = $(".date-definition-container").length; if (min_date_definition_index > 1) { $('.date-definition-container button.remove-date-defintion-btn').removeClass("d-none"); @@ -1690,7 +1690,7 @@ $('#allday').on('change', function() { }); last_container.after(new_container); - new_container.gsevptDateDefinition(); + new_container.eventcallyDateDefinition(); if ($.find(".date-definition-container").length > 1) { $('.date-definition-container button.remove-date-defintion-btn').removeClass("d-none"); diff --git a/project/templates/layout.html b/project/templates/layout.html index bad4f5f..7b791e2 100644 --- a/project/templates/layout.html +++ b/project/templates/layout.html @@ -4,7 +4,7 @@ {%- block html %} {%- block head %} - {%- block title -%}{{ title|default('gsevpt') }}{% endblock title %} + {%- block title -%}{{ title|default('eventcally') }}{% endblock title %} diff --git a/project/templates/manage/widgets.html b/project/templates/manage/widgets.html index 5d8bc95..dcbba42 100644 --- a/project/templates/manage/widgets.html +++ b/project/templates/manage/widgets.html @@ -49,10 +49,10 @@

Kopiere den unten stehenden Code und füge ihn auf deiner Website ein.

Füge den folgenden Code im <head> der Seite ein.

Füge den folgenden Code an der Stelle im <body> der Seite ein, wo das Widget dargestellt werden soll.

- +

Mit den folgenden Attributen kann das Widget konfiguriert werden:

  • data-widget-short-name: Kurzname der Organisation
  • @@ -61,8 +61,8 @@
  • data-widget-resize: iFrame Größe automatisch anpassen
  • data-widget-google-tag-manager: Events in window.dataLayer für Google Tag Manager schreiben.
      -
    • Event gsevptWidget.pageView mit Parameter url
    • -
    • Event gsevptWidget.linkClick mit Parameter url
    • +
    • Event eventcallyWidget.pageView mit Parameter url
    • +
    • Event eventcallyWidget.linkClick mit Parameter url
diff --git a/project/templates/widget/event_date/list.html b/project/templates/widget/event_date/list.html index 414b261..bcb4442 100644 --- a/project/templates/widget/event_date/list.html +++ b/project/templates/widget/event_date/list.html @@ -21,7 +21,7 @@ function trackAnalyticsEvent(data) { if ('parentIFrame' in window) { - parentIFrame.sendMessage({'type': 'GSEVPT_ANALYTICS_EVENT', 'data': data}); + parentIFrame.sendMessage({'type': 'EVENTCALLY_ANALYTICS_EVENT', 'data': data}); } } diff --git a/tests/api/test_organization.py b/tests/api/test_organization.py index 09654d3..2a92b7b 100644 --- a/tests/api/test_organization.py +++ b/tests/api/test_organization.py @@ -48,17 +48,17 @@ def test_list_unverified(client, app, seeder, utils): assert response.json["items"][0]["id"] == verified_admin_unit_id # Authorisierte Nutzer, die Organisationen verifizieren dürfen, sehen alle Organisationen. - # "admin@gsevpt.de" ist Mitglied der Organisation "gsevpt", die andere Organisationen verifizieren darf. + # "admin@eventcally.de" ist Mitglied der Organisation "eventcally", die andere Organisationen verifizieren darf. with app.app_context(): from project.services.admin_unit import get_admin_unit_by_name - gsevpt_id = get_admin_unit_by_name("gsevpt").id + eventcally_id = get_admin_unit_by_name("eventcally").id utils.logout() - utils.login("admin@gsevpt.de") + utils.login("admin@eventcally.de") response = utils.get_ok(url) assert len(response.json["items"]) == 3 - assert response.json["items"][0]["id"] == gsevpt_id + assert response.json["items"][0]["id"] == eventcally_id assert response.json["items"][1]["id"] == unverified_admin_unit_id assert response.json["items"][2]["id"] == verified_admin_unit_id diff --git a/tests/conftest.py b/tests/conftest.py index c17a17d..d13c2df 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -12,7 +12,7 @@ def pytest_generate_tests(metafunc): warnings.filterwarnings("error", category=SAWarning) os.environ["DATABASE_URL"] = os.environ.get( - "TEST_DATABASE_URL", "postgresql://postgres@localhost/gsevpt_tests" + "TEST_DATABASE_URL", "postgresql://postgres@localhost/eventcally_tests" ) os.environ["AUTHLIB_INSECURE_TRANSPORT"] = "1" os.environ[ diff --git a/tests/seeder.py b/tests/seeder.py index 0e1ea1a..7c420a3 100644 --- a/tests/seeder.py +++ b/tests/seeder.py @@ -99,14 +99,14 @@ class Seeder(object): from project.services.admin_unit import get_admin_unit_by_name with self._app.app_context(): - other_admin_unit = get_admin_unit_by_name("gsevpt") + other_admin_unit = get_admin_unit_by_name("eventcally") if other_admin_unit: other_admin_unit_id = other_admin_unit.id else: - other_user_id = self.create_user("admin@gsevpt.de") + other_user_id = self.create_user("admin@eventcally.de") other_admin_unit_id = self.create_admin_unit( - other_user_id, "gsevpt", can_verify_other=True + other_user_id, "eventcally", can_verify_other=True ) self.create_admin_unit_relation( @@ -637,13 +637,13 @@ class Seeder(object): def create_common_scenario(self): with self._app.app_context(): - # Admin with gsevpt organisation + # Admin with eventcally organisation admin_id = self.create_user( "admin@test.de", "MeinPasswortIstDasBeste", admin=True ) - gsevpt_admin_unit_id = self.create_admin_unit( + eventcally_admin_unit_id = self.create_admin_unit( admin_id, - "gsevpt", + "eventcally", suggestions_enabled=True, can_create_other=True, can_verify_other=True, @@ -661,7 +661,7 @@ class Seeder(object): incoming_verification_requests_text="Please give us a call", ) self.create_admin_unit_relation( - gsevpt_admin_unit_id, + eventcally_admin_unit_id, marketing_admin_unit_id, verify=True, ) diff --git a/tests/views/test_app.py b/tests/views/test_app.py index 961c789..888f824 100644 --- a/tests/views/test_app.py +++ b/tests/views/test_app.py @@ -1,3 +1,3 @@ def test_index(client): response = client.get("/") - assert b"gsevpt" in response.data + assert b"eventcally" in response.data