aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/route_manager.py (follow)
Commit message (Collapse)AuthorAgeLines
* Move from CSS to SCSS (#86)Gravatar Gareth Coles2018-06-05-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rewrite existing style.css with sass * Add "uses-rst" class for pages that use rendered RST This replaces the previous method of just listing every page in the sass * Remove old debug print * Mixins and error pages * Newly built CSS * Add SASS cache to .gitignore * New error SASS * Slight changes to error template * Add UIKit SCSS to repo This includes the LICENSE and our customizations, which makes life way easier for contributors * Reorganize sass folder; your watchers can avoid uikit now * Sass folder should be called scss * Change variable names * [SCSS] Linting * Fix scss_lint gem name [ci skip] * [SCSS] Now you can compile with just Python! * Temporary hack to make the wiki editor taller * [SCSS] @jchristgit * [SCSS.py] Require specification of include dir to simplify the SCSS imports * [SCSS] All inline styles have been removed * [SCSS] Update UIKit theme to import from our variables * [SCSS] Remove extra newlines in errors/_common.scss
* Privacy/Usability updates (#75)Gravatar Gareth Coles2018-05-20-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use less intrusive oauth scopes, add login redirect method * Remove debugging prints, add missing __init__ * Work towards new privacy policy * Fix judging state icons on code jam management page * Jammer profile retraction and punishments based on jam status * Linting * [Jams] Deny profile saving for users < 13 years, and finish removal page * Fix tests * Clean up and address Volcyy's review * Add proper login redirection to require_roles decorator * Fix template is_staff() and add staff link to navigation * Address lemon's review * Linting * Privacy page formatting * Privacy page formatting
* LintingGravatar Gareth Coles2018-05-15-1/+1
|
* Add RedirectView class for views that only redirect elsewhereGravatar Gareth Coles2018-05-15-1/+2
|
* Add TemplateView class for views that only render a templateGravatar Gareth Coles2018-05-15-1/+2
|
* Gunicorn is super picky about when_ready arityGravatar Gareth Coles2018-05-14-1/+1
|
* Migration runner and migrations (#69)Gravatar Gareth Coles2018-05-14-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Migration runner and migrations * Remove demo wiki data * [Staff] Table management pages * Fix weird travis build omission * Address review and comments by @Volcyy * [Tables] Fix pagination * Move table definitions to new file with nameduple * Linting * Address lemon's review comments * Address @Volcyy's review * Address lemon's review * Update search placeholder * Search by key now available
* Declaring the encoding to be utf-8 is not necessary in Python3 projects, as ↵Gravatar Leon Sandøy2018-04-27-1/+0
| | | | this is the default encoding. Encoding declarations are only useful in py3 if you want to declare it to be something _other_ than utf-8. This was, however, a very useful convention in py2. (#56)
* Revert unnecessary changeGravatar Gareth Coles2018-04-09-2/+2
|
* Add font-awesome pro, and default to port 80Gravatar Gareth Coles2018-04-09-2/+2
|
* A few smaller fixesGravatar Gareth Coles2018-04-05-0/+5
|
* Attempt to fix CSRF; add debug info to staff pageGravatar Gareth Coles2018-04-05-1/+1
|
* Attempting CSRF fixesGravatar Gareth Coles2018-04-04-6/+4
|
* Forget about CSRF, will fix tomorrowGravatar Gareth Coles2018-04-03-1/+1
|
* Explicitly exclude the API subdomain from CSRF checksGravatar Gareth Coles2018-04-03-3/+3
| | | | TODO: Do this properly!
* Committing wiki subdomain so I can fix my X serverGravatar Gareth Coles2018-04-03-4/+4
|
* Fix testsGravatar Gareth Coles2018-04-01-1/+5
|
* Add CSRF protection and optimise importsGravatar Gareth Coles2018-04-01-2/+4
|
* Fix logging, restrict staff index routeGravatar Gareth Coles2018-04-01-1/+1
|
* Accept username/discriminator from the bot and remove it from oauthGravatar Gareth Coles2018-03-30-1/+1
|
* I'm assuming this is the last linting commit for now...Gravatar Gareth Coles2018-03-30-1/+1
|
* Flake8Gravatar Gareth Coles2018-03-30-2/+2
|
* More convenient static_file() function for templatesGravatar Gareth Coles2018-03-29-1/+0
|
* Fix error routing and more work on static filesGravatar Gareth Coles2018-03-29-2/+2
|
* Fix error handler managementGravatar Gareth Coles2018-03-29-2/+6
|
* Attempt to fix HTTPS and more OAuth issuesGravatar Gareth Coles2018-03-29-1/+12
|
* Add PREFERRED_URL_SCHEME env var to fix `url_for()`Gravatar Gareth Coles2018-03-29-2/+3
|
* Oauth (#45)Gravatar Nate the great2018-03-29-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Creating a OAUTH login for the site. We still need to have a way to fill in credentials however. Signed-off-by: Zwork101 <[email protected]> * How ya like me now Travis? Signed-off-by: Zwork101 <[email protected]> * Fix slight error in database insertion * Revert "Fix slight error in database insertion" (wrong branch) This reverts commit 9ac6cbb * Don't have snekchek working, but I'll try again. Signed-off-by: Zwork101 <[email protected]> * Please enter the commit message for your changes. Lines starting * Adding Oauth2 login to site. * Add prefix * Add prefix * This never happened * Flipping Travis I still can't get snekchek to work locally. * Added a whole bunch of stuff, ready to be used. Signed-off-by: Zwork101 <[email protected]> * Making sessions more secure, and future safe. Signed-off-by: Zwork101 <[email protected]> * Adding some quick stuff Signed-off-by: Zwork101 <[email protected]> * Appease the flake8 gods Signed-off-by: Zwork101 <[email protected]> * Appease the flake8 gods Signed-off-by: Zwork101 <[email protected]> * Whoops Signed-off-by: Zwork101 <[email protected]> * Add comments, fix user_data function. Signed-off-by: Zwork101 <[email protected]> * Whooops, forgot to flake :/ Signed-off-by: Zwork101 <[email protected]> * Make it look nicer, thanks Aperture. Signed-off-by: Zwork101 <[email protected]> * Fixing login issues and added button * Add a OauthMixin to allow for easy data access. Clean stuff up. Signed-off-by: Zwork101 <[email protected]> * Fix a test, and use self.assertEqual rather then self.assertEquals! Signed-off-by: Zwork101 <[email protected]> * Please don't ask how that happened. Signed-off-by: Zwork101 <[email protected]> * Added some tests, moved a bunch of stuff around. Mainly cleaned stuff up. Signed-off-by: Zwork101 <[email protected]> * Add a ton of tests, try to please the coverall gods :D, moved some code into a function for testing. Signed-off-by: Zwork101 <[email protected]> * Just some stupid stuff I missed. Signed-off-by: Zwork101 <[email protected]> * Fix an issue with the test, and add docs Signed-off-by: Zwork101 <[email protected]> * Remove pointless function. (join_user) Signed-off-by: Zwork101 <[email protected]> * Fix test consistency
* API for tags (#34)Gravatar Leon Sandøy2018-03-06-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Help page and misc improvements Committing so I can go home >:| * [WIP] - API improvements for the tag features. Not completed. * renaming tag.py to tags.py and refactoring the nomenclature of docs to tags * fixed error message in tags, cleaning up app_test.py * tests for the tags feature * ignoring jsonify returns cause coverall can't handle them * Catch-all error view for the API blueprint * cleaning up APIErrorView a little * bringing coverage for tags.py to 100% * how did this get in here? * how did this get in here? ROUND 2 * Removing the 503 database error handling. It's not in use and we should probably rethink that whole custom error handling system anyway. * Converting the tags file to use the @api_params decorator instead of validating manually. Tested with bot staging.
* Add error messages (#30)Gravatar Joseph2018-02-28-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add error messages Signed-off-by: JoeBanks13 <[email protected]> * Remove un-used keyword arg from 404 * Assert for status code instead of full content * PEP8 * test lint * please coverage * oh * Exclude websockets.py from coverage * Move code output into terminal * Switch typewriter href protocol * Add tests for websockets.py * Abort previous commit, coveralls did not let coverage go down * Add more pauses and request => response * move css and js out, add typewriter JS to our own repo & add method for appending text in bulk. * Enable REPL on 4XX and change error descriptions * commas * /error path
* Rearrange views and templatesGravatar Gareth Coles2018-02-21-0/+1
|
* Merge remote-tracking branch 'origin/master'Gravatar Gareth Coles2018-02-18-2/+2
| | | | | # Conflicts: # pysite/views/ws/echo.py
* Merge remote-tracking branch 'origin/master'Gravatar Gareth Coles2018-02-18-7/+7
|\ | | | | | | | | # Conflicts: # pysite/views/ws/echo.py
| * Simple logging. (#16)Gravatar Leon Sandøy2018-02-18-7/+7
| | | | | | | | | | | | | | | | * Simple logging. I don't know if this will show up in the docker logs like inver wanted, so it probably needs testing in prod. * log level via hasattr/getattr, basicConfig instead of custom handlers * removing the empty string log call
* | Rename "Websocket" to "WS" to avoid confusion with the gevents-websocket ↵Gravatar Gareth Coles2018-02-18-4/+4
|/ | | | WebSocket class
* Integrate websockets into the Flask webappGravatar Gareth Coles2018-02-17-7/+28
|
* Hey, who turned out the lights?!Gravatar Gareth Coles2018-02-15-1/+1
|
* snekchekGravatar Gareth Coles2018-02-15-1/+1
|
* Fix up API key validation and database api locationGravatar Gareth Coles2018-02-15-5/+1
|
* Database API Improvements #1qcra (#13)Gravatar Gareth Coles2018-02-14-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * A large set of changes, including: * A mixin for views that need the DB * Many changes to the database class in order to make things more fluid * Provide the route manager in view setup() methods * Pushing up the progress so far * snekchek * Full (undocumented) database implementation * snekchek * Don't rely on exceptions for table deletion * Add RethinkDB data to gitignore * Documentation for DB class * Make Flake8 ignore P102 What even is that? What does "docstring does contain unindexed parameters" mean? * Document the base_routes module * Cleanup RE latest reviews * snekchek (bah)
* RethinkDB API Views #yqhgGravatar lmn2018-02-13-52/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactoring the database implementation into a class of its own. * Refactoring the database implementation into a class of its own. * healthcheck should belong to the API. * dynamic subdomain loading, setting up basic handling for staff.pythondiscord.com, and started on a TagView for a bot tag feature. * Oops, forgot to fix some merges. * Some quality of life updates - default values for env variables that aren't secret, and starting to get through the tag view. * Refactoring the database implementation into a class of its own. * healthcheck should belong to the API. * dynamic subdomain loading, setting up basic handling for staff.pythondiscord.com, and started on a TagView for a bot tag feature. * Oops, forgot to fix some merges. * Some quality of life updates - default values for env variables that aren't secret, and starting to get through the tag view. * API validation added to the APIView class, TagView should be finished as well. * super important commit you guys * fixed a bug with the RethinkDB class where host and port attributes were accessed before being created * Fixed my editor now you guys * Fixing up some of the problems brought up in gdude's review * Handling GET requests with param indata and POST with JSON. Fixed error handling to use the constants and the baseclass self.error(). * Get API-key from headers, context manage the db assignment, and default env var values * Changed API-KEY header to X_API_Key. Added a default for secret key. it should no longer be necessary with environment variables to run this system locally. * Changing back the nav to have relative paths * Why am I like this
* Server name via env var, defaulted to localhostGravatar Gareth Coles2018-02-11-1/+1
|
* Set server name for app configGravatar Gareth Coles2018-02-11-0/+1
|
* Guess who forgot to run snekchek!Gravatar Gareth Coles2018-02-09-1/+1
|
* Make APIView base class not loadableGravatar Gareth Coles2018-02-09-1/+2
|
* Move from straight app registration to Blueprints (#6)Gravatar Gareth Coles2018-02-09-6/+18
|
* Weird, PyCharm didn't commit all my changes last pushGravatar Gareth Coles2018-02-08-1/+0
|
* Merge remote-tracking branch 'origin/master'Gravatar Gareth Coles2018-02-08-4/+55
|\
| * Turn on debug mode with `FLASK_DEBUG=1`Gravatar Gareth Coles2018-02-07-2/+4
| |
| * Static files; basic templatesGravatar Gareth Coles2018-02-07-1/+6
| |