Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing typo in demo.py file #611

Merged
merged 3 commits into from
Feb 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions examples/hydrus-demo-server/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from hydrus.data.db_models import Base
from hydrus.data.user import add_user
from doc import doc
from gevent.wsgi import WSGIServer
from gevent.pywsgi import WSGIServer


if __name__ == "__main__":
Expand Down Expand Up @@ -56,10 +56,6 @@
print("Adding authorized users")
add_user(id_=1, paraphrase="test", session=session)

# Insert them into the database
doc_parse.insert_classes(classes, session)
doc_parse.insert_properties(properties, session)

print("Creating the application")
# Create a Hydrus app with the API name you want, default will be "api"
app = app_factory(API_NAME)
Expand All @@ -68,7 +64,7 @@
with set_authentication(app, True):
# Use authentication for all requests
with set_token(app, True):
with set_api_name(app, "serverapi"):
with set_api_name(app, API_NAME):
# Set the API Documentation
with set_doc(app, apidoc):
# Set HYDRUS_SERVER_URL
Expand Down