Editing Getting Started with CLOT
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 39: | Line 39: | ||
If you look in api.py, there’s a line that says TestMode = False. By changing this to True, you’ll enable test mode which allows you to test your app offline using fake data. | If you look in api.py, there’s a line that says TestMode = False. By changing this to True, you’ll enable test mode which allows you to test your app offline using fake data. | ||
− | In test mode, the app won’t hit | + | In test mode, the app won’t hit warlight.net APIs at all, and instead when the code tries to call an API, it will return fake data. This is useful while building your app since you can easily simulate players signing up and see how games get created with them. You can do things like simulate 500 players signing up to your tournament, which would be very time consuming to do by hand. |
There's also a page, at '''/test''' that helps invoke your code. This page is only accessible while TestMode is True. To access it, just visit /test/<lotid>. The easiest way to get there is to visit a lot in your browser, and change your browser's url from '''/lot/1234567''' to '''/test/1234567'''. | There's also a page, at '''/test''' that helps invoke your code. This page is only accessible while TestMode is True. To access it, just visit /test/<lotid>. The easiest way to get there is to visit a lot in your browser, and change your browser's url from '''/lot/1234567''' to '''/test/1234567'''. | ||
Line 51: | Line 51: | ||
To set this up, it requires two additional configuration changes. | To set this up, it requires two additional configuration changes. | ||
− | # While logged into your main | + | # While logged into your main WarLight account, visit https://www.warlight.net/CLOT/Config. In the CLOT Redirect URL field, insert a path to your CLOT's '''login''' page. For example, http://clot-test.appspot.com/login |
# At the bottom of this same page, the site will tell you your CLOT Authentication URL. At the end of this URL is a number (the "p" parameter) that identifies your invite token. You need to insert this number into your python code in two places: join.py and leave.py. | # At the bottom of this same page, the site will tell you your CLOT Authentication URL. At the end of this URL is a number (the "p" parameter) that identifies your invite token. You need to insert this number into your python code in two places: join.py and leave.py. | ||