Skip to content

Commit

Permalink
fix conflicts with upstream branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ajskateboarder committed Aug 2, 2023
2 parents ecb84bc + 9972001 commit 6eada0c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
15 changes: 14 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,21 @@ DAZZLE_DIR=".dazzle-archive"

# change SERVER_MODE to "yes" if running a public server
SERVER_MODE="no"

# Running in Replit?
REPLIT_MODE="no"


USE_SCRATCHDB="yes"

# change this to the IP:PORT that you're going to expose
SERVER_HOST="http://localhost:5000"
SERVER_HOST="localhost:3000"

# Debug mode
DEBUG="yes"

# Run flask in debug mode
FLASK_DEBUG="yes"

DB_LOCATION="users.sqlite"
DB_TABLE="users"
16 changes: 12 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
from os import listdir
from flask import Flask, render_template, stream_template, request, redirect
from os.path import exists
from werkzeug import exceptions as werkexcept
import dazzle
import json

REPLIT_MODE = False
USE_SCRATCHDB = True

debug = True
REPLIT_MODE = True if dazzle.env["REPLIT_MODE"] == "yes" else False
USE_SCRATCHDB = True if dazzle.env["USE_SCRATCHDB"] == "yes" else False
HOST, PORT = dazzle.env["SERVER_HOST"].split(":")
DEBUG = True if dazzle.env["DEBUG"] == "yes" else False
FLASK_DEBUG = True if dazzle.env["FLASK_DEBUG"] == "yes" else False

"""
**** Snazzle Server Code ****
Expand Down Expand Up @@ -256,7 +260,7 @@ def project(project_id):
else:
creator_name = str(creator_name) + " ●" # add the dot
ocular_colour = f"color:{ocular_colour}"
if not debug:
if not DEBUG:
return stream_template(
"projects.html",
project_id=project_id,
Expand Down Expand Up @@ -350,3 +354,7 @@ def scratch_auth():
def err404(e: Exception):
# route for error
return render_template("_error.html", errdata=e), 404

# CHANGE THIS IF YOU'RE RUNNING A PUBLIC SERVER
if __name__ == "__main__":
app.run(host=HOST, port=PORT, debug=FLASK_DEBUG)

0 comments on commit 6eada0c

Please sign in to comment.