Skip to content

Commit

Permalink
chore: fix init
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdur-rahmaanJ committed Sep 26, 2024
1 parent 463a996 commit 01911d6
Showing 1 changed file with 6 additions and 28 deletions.
34 changes: 6 additions & 28 deletions src/shopcube/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,7 @@

from flask_login import LoginManager
from flask_mailman import Mail
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from flask_wtf.csrf import CSRFProtect

# from flask_marshmallow import Marshmallow, uncommented as not updated to support flask 2.x

root_path = os.path.dirname(os.path.abspath(__file__)) # don't remove
static_path = os.path.join(root_path, "static") # don't remove
modules_path = os.path.join(root_path, "modules") # don't remove
themes_path = os.path.join(static_path, "themes") # don't remove
installed_packages = [] # don't remove

installed_packages = []

db = SQLAlchemy()
# ma = Marshmallow()
login_manager = LoginManager()
migrate = Migrate()
mail = Mail()
csrf = CSRFProtect()

import os

from flask_login import LoginManager
from flask_mailman import Mail
from flask_marshmallow import Marshmallow
#from flask_marshmallow import Marshmallow
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from flask_uploads import DOCUMENTS
Expand All @@ -43,13 +18,16 @@
static_path = os.path.join(root_path, "static") # don't remove
modules_path = os.path.join(root_path, "modules") # don't remove
themes_path = os.path.join(static_path, "themes") # don't remove
installed_packages = []

db = SQLAlchemy()
ma = Marshmallow()
# ma = Marshmallow()

ma = None
login_manager = LoginManager()
migrate = Migrate()
csrf = CSRFProtect()
mail = Mail()
csrf = CSRFProtect()

productphotos = UploadSet("productphotos", IMAGES)
categoryphotos = UploadSet("categoryphotos", IMAGES)
Expand Down

0 comments on commit 01911d6

Please sign in to comment.