diff --git a/.gitignore b/.gitignore index aab7ea0..51c29a7 100644 --- a/.gitignore +++ b/.gitignore @@ -108,3 +108,4 @@ dmypy.json .pyre/ # End of https://www.gitignore.io/api/python +env/ diff --git a/soa/__init__.py b/soa/__init__.py index e407c47..199aeac 100644 --- a/soa/__init__.py +++ b/soa/__init__.py @@ -1,5 +1,8 @@ from gevent import monkey +import sys +if sys.path[0] != '': #Some redhat distributions are not picking up the current directory in path + sys.path.insert(0, '') monkey.patch_all() from soa import settings from soa import models diff --git a/soa/__main__.py b/soa/__main__.py index 11282bf..a613435 100644 --- a/soa/__main__.py +++ b/soa/__main__.py @@ -22,6 +22,6 @@ "host": "0.0.0.0", } if settings.is_dev: - kwargs.update(dict(debug=True, reloader=True)) + kwargs.update(dict(debug=True, reloader=False)) kwargs["server"] = "gevent" app.run(**kwargs) diff --git a/soa/server.py b/soa/server.py index 3196bc6..d6cc6ee 100644 --- a/soa/server.py +++ b/soa/server.py @@ -84,7 +84,8 @@ def f(email: str, LoginToken, User): u.ensure_email_hash(bottle.request.session) token = LoginToken.loop_create(bottle.request.session, user=u) mailer.send_otp(email, token.otp) - return bottle.redirect(app.get_url("get_login", otp_sent=True)) + url = app.get_url("otp", q=token.otp) if settings.is_dev else app.get_url("get_login", otp_sent=True) + return bottle.redirect(url) @app.get("/otp", skip=["login_required"], name="otp") diff --git a/soa/tracks/python/1.md b/soa/tracks/python/1.md index bfb5a90..5aa68cb 100644 --- a/soa/tracks/python/1.md +++ b/soa/tracks/python/1.md @@ -1,8 +1,25 @@ -## Adding numbers +## Get started -Python lets you do mathematics. For example 1+1, and 2+2. +Whether you are new to programming or an experienced developer, it's easy to learn and use Python. Python is an interpreted, high-level, general-purpose programming language. -How would you add 3 and 4? +###Overview +By the end of this Task, you will be able to perform basic operations in Python.
+ +* To complete the task, you must have a Hackerrank Account. If you don't have one +[create it.](https://hackerrank.com/auth/signup)
+ +###Solve the given problem
+[Arithmetic Operators Problem](https://www.hackerrank.com/challenges/python-arithmetic-operators/problem) + +Don't know how to solve a python problem? Check the references below
+* [Taking Input in Python](https://www.geeksforgeeks.org/taking-input-in-python)
+* [Basic Operators](https://www.geeksforgeeks.org/basic-operators-python/)
+* [Type Casting in Python](https://www.geeksforgeeks.org/type-conversion-python/) + +###Similar Problems for Practice + + +Please enter your Hackerrank ID to track your progress.
diff --git a/soa/tracks/python/__init__.py b/soa/tracks/python/__init__.py index 48c69de..381fb16 100644 --- a/soa/tracks/python/__init__.py +++ b/soa/tracks/python/__init__.py @@ -7,5 +7,5 @@ class Python(Track): description = ( "The basics of python that you'll need to complete the rest of the tracks." ) - is_locked = True + is_locked = False if settings.is_dev else True gh_issue_map = {1: 19} \ No newline at end of file