Skip to content

Commit

Permalink
Merge pull request #74 from yaal-coop/issue-63-b3desk
Browse files Browse the repository at this point in the history
Renommage de l’application `flaskr` en `b3desk`
  • Loading branch information
azmeuk authored Dec 12, 2023
2 parents 6292302 + dab0d63 commit 2d2fb33
Show file tree
Hide file tree
Showing 1,711 changed files with 1,916 additions and 1,875 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
rev: v3.12.0
hooks:
- id: reorder-python-imports
args: ["--application-directories", "flaskr"]
args: ["--application-directories", "b3desk"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ services:
env_file:
- ${ENV_FILE_OVERRIDE-web.env}
volumes:
- ./web/flaskr:/opt/bbb-visio/flaskr
- ./web/b3desk:/opt/bbb-visio/b3desk
- ./web/tests:/opt/bbb-visio/tests
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
# - web.env
volumes:
- ./web/logs:/var/log
- ./web/flaskr:/opt/bbb-visio/flaskr
- ./web/b3desk:/opt/bbb-visio/b3desk
- ./web/instance:/opt/bbb-visio/instance
- ./web/migrations:/opt/bbb-visio/migrations
- ./web/translations:/opt/bbb-visio/translations
Expand All @@ -34,7 +34,7 @@ services:
environment:
- APP=tasks.celery
volumes:
- ./web/flaskr:/usr/src/app
- ./web/b3desk:/usr/src/app
command: celery --app tasks.celery worker --loglevel=info

broker:
Expand Down
6 changes: 3 additions & 3 deletions documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("../web"))
sys.path.insert(0, os.path.abspath("../web/flaskr"))
sys.path.insert(0, os.path.abspath("../web/b3desk"))


# -- General configuration ------------------------------------------------
Expand All @@ -29,12 +29,12 @@
".md": "markdown",
}
master_doc = "index"
project = "flaskr"
project = "b3desk"
year = datetime.datetime.now().strftime("%Y")
copyright = f"{year}, Ministère de l'Éducation Nationale"
author = "Ministère de l'Éducation Nationale"

release = "1.1.0" # metadata.version("flaskr")
release = "1.1.0" # metadata.version("b3desk")
version = "%s.%s" % tuple(map(int, release.split(".")[:2]))
language = "fr"
exclude_patterns = []
Expand Down
3 changes: 1 addition & 2 deletions documentation/developers/translation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Traductions

## Ajouter du texte à traduire
Expand All @@ -25,7 +24,7 @@ Cette commande va mettre à jour les catalogues existants avec de nouveaux messa

## Traduire du texte

Les fichiers à traduire sont `web/flaskr/translations/*/LC_MESSAGES/messages.po`.
Les fichiers à traduire sont `web/b3desk/translations/*/LC_MESSAGES/messages.po`.
Lors de la traduction, il ne faut pas traduire les motifs du type `%(...)s` mais simplement mettre l'équivalent traduit.
Par exemple, pour une traduction vers l'anglais :

Expand Down
2 changes: 1 addition & 1 deletion documentation/maintainers/settings.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Configuration
#############

.. autopydantic_model:: flaskr.settings.MainSettings
.. autopydantic_model:: b3desk.settings.MainSettings
2 changes: 1 addition & 1 deletion web.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# App Configuration
FLASK_APP=flaskr
FLASK_APP=b3desk
FLASK_DEBUG=True
SECRET_KEY=SomethingNotEntirelySecret
TITLE=BBB-Visio
Expand Down
2 changes: 1 addition & 1 deletion web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY misc/wsgi.py misc/gunicorn.py misc/run_webserver.sh /opt/bbb-visio/
COPY misc/delete_uploaded_files.cron /etc/cron.d/delete_uploaded_files
RUN chmod u+x /opt/bbb-visio/run_webserver.sh
COPY migrations /opt/bbb-visio/migrations
COPY flaskr /opt/bbb-visio/flaskr
COPY b3desk /opt/bbb-visio/b3desk

WORKDIR /opt/bbb-visio/
ENTRYPOINT ["/opt/bbb-visio/run_webserver.sh"]
8 changes: 4 additions & 4 deletions web/flaskr/__init__.py → web/b3desk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
import logging
import os

from b3desk.settings import MainSettings
from b3desk.utils import is_rie
from flask import Flask
from flask import request
from flask import session
from flask_babel import Babel
from flask_caching import Cache
from flask_migrate import Migrate
from flask_wtf.csrf import CSRFProtect
from flaskr.settings import MainSettings
from flaskr.utils import is_rie


CRITICAL_VARS = ["OIDC_ISSUER", "OIDC_CLIENT_SECRET", "BIGBLUEBUTTON_SECRET"]
Expand Down Expand Up @@ -70,9 +70,9 @@ def setup_csrf(app):

def setup_database(app):
with app.app_context():
import flaskr.routes
import b3desk.routes

app.register_blueprint(flaskr.routes.bp)
app.register_blueprint(b3desk.routes.bp)
from .models import db

db.init_app(app)
Expand Down
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions web/b3desk/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# +----------------------------------------------------------------------------+
# | BBB-VISIO |
# +----------------------------------------------------------------------------+
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the European Union Public License 1.2 version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()
Loading

0 comments on commit 2d2fb33

Please sign in to comment.