aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/constants.py (follow)
Commit message (Collapse)AuthorAgeLines
* Initial project layout for djangoGravatar Gareth Coles2018-08-07-151/+0
|
* Addressing gdude commentsGravatar Leon Sandøy2018-07-29-25/+35
|
* Now doing role colorization instead of random colors for the cleanlog template.Gravatar Leon Sandøy2018-07-22-0/+20
|
* Remove space from end of `JAMMERS_ROLE` id in constants.pyGravatar Joseph Banks2018-07-06-1/+1
|
* [API] Implement chunk-based user update mechanismGravatar Gareth Coles2018-06-24-0/+1
|
* GitLab team repo storage, edit form, etc.Gravatar momothereal2018-06-23-0/+2
|
* Wiki audit logsGravatar Joseph Banks2018-06-17-7/+1
|
* Logging changesGravatar Gareth Coles2018-06-06-8/+0
| | | | | | * Log to .json file in debug mode, with textual stdout * Log to .txt in production, with JSON stdout * No more Papertrail
* [Jams] Send signup messages to jam log channelGravatar Gareth Coles2018-06-02-0/+1
|
* [Gunicorn] Announce site deploymentGravatar Gareth Coles2018-05-31-0/+1
|
* [RMQ] Finish events implementation; add jammer role to constantsGravatar Gareth Coles2018-05-31-1/+2
|
* Switch constants aroundGravatar Gareth Coles2018-05-30-1/+1
|
* Attempt to fix travis buildGravatar Gareth Coles2018-05-30-1/+1
|
* RabbitMQ mixin, powered by Kombu (#84)Gravatar Gareth Coles2018-05-30-0/+21
| | | | | | | | * [RMQ] Add Kombi an an RMQMixin, as well as some constants * [RMQ] Fix example in mixin docstring * Update Pipfile.lock - for some reason, pipenv didn't lock kombu
* Privacy/Usability updates (#75)Gravatar Gareth Coles2018-05-20-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add "preparing" stateGravatar Gareth Coles2018-05-19-0/+1
|
* [Jams] Complete question listing/editing/etcGravatar Gareth Coles2018-05-19-0/+1
|
* [Jams] A bunch more work. That's all for tonight, though.Gravatar Gareth Coles2018-05-18-0/+10
|
* [Jams] Huge amount of work on code jam admin areaGravatar Gareth Coles2018-05-18-0/+8
|
* Migration runner and migrations (#69)Gravatar Gareth Coles2018-05-14-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Move bot API key to a constantGravatar Gareth Coles2018-05-08-0/+3
|
* Declaring the encoding to be utf-8 is not necessary in Python3 projects, as ↵Gravatar Leon Sandøy2018-04-27-2/+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)
* [#1eeu1] Hiphopify (#54)Gravatar Leon Sandøy2018-04-20-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changed the dev-mode logic to be the same as prod for creating new tables if they don't exist. Also added a new feature where a table can be initialized with data if you create a JSON file in the pysite/database/table_init/ folder and fill it with a list of dicts where each dict represents a row in your table. Included a hiphoppers json so that I can actually test if it works in production. It will only init the table if the table is empty. * Not sure if this will solve it, but I think so. * Renamed the tables and primary keys, and alphabetized the dict. Now complies with the gdudes holy wishes. * Almost done with the initial build for this. Implemented GET and DELETE, in order to finish POST I need to expand the database.py interface class. * Alphabetized database convenience wrappers. * Fixed a few typehints and added the sample convenience wrapper to the database class. * Finishing up the POST method and adding a duration parser to the utils folder so we can handle strings like 2w3d and turn them into a timestamp. * Fixed API blueprint loading, which was broken by the setup method in the DBMixIn. I'd forgotten to remove the check for table_name attribute. Also adde some logging and got the DELETE route working. * Added timezone-sensitivity to the duration parser so it will work with rethink. renamed the json and fixed some bugs in the hiphopify API. * Added a utility to test if rdb timestamps are expired, and only returning data from the GET calls if it isn't expired. * changed some log wording * Setting up Lil Joseph as default image. Adding some rappers to the list. * Adding a bunch of logging * These tests no longer apply. New tests must be written in the long run, removing them for now. * Addressing review comments left by Volcyy * Fixed misleading comment.
* Add wiki audit logs (#52)Gravatar Joseph2018-04-17-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add wiki audit logs * Flake8 issues * Forgot to remove debug prints * Removed print but forgot to remove `.text` * Futile attempt to increase coverage * Reading up on API docs asks us to send User-Agent with our info in it * Add tests for wiki * Well played, Travis * Nothing in my local env is working on travis lol * Why does it appear it can't decide between 200 & 302 :thinking: * Flake8 * Post route * Same issue with local env working differently from Travis env * Add page to show page is being edited * Lock page when it is being edited * Add JS to keep refreshing lock on article * Add compare route to render diff * Add revision table to database * Add revision storage * Add revision list route * JS for Revision list radio buttons * Add revision comparison template * Add revision list template * flak8 my ass * [Unit Tests] New unit tests for history routes :sparkles: * Does this fix things? * Address gdude's reviews * Noticed a bug in the diff generation route which meant that empty posts could potentially error * Flake 8 * Audit logs were logging after change, meaning it was comparing after & after, which didn't work * Change table name * Remove whitespace from line to fix flake8 issue * Address reviews * Git hook made me do something wrong, apologies * Switch from werkzeug redirect to flask one * Address Apertures reviews
* Snowflakes should be handled as stringsGravatar Gareth Coles2018-04-10-6/+8
|
* Allow contribs to edit wiki pagesGravatar Gareth Coles2018-04-10-1/+2
|
* Easier debugging and optimised importsGravatar Gareth Coles2018-04-08-1/+3
| | | | Simply set FLASK_DEBUG=1 in your env to skip OAuth checks
* Allow helpers to edit pages alsoGravatar Gareth Coles2018-04-07-0/+1
|
* Add CSRF protection and optimise importsGravatar Gareth Coles2018-04-01-0/+6
|
* Fix logging, restrict staff index routeGravatar Gareth Coles2018-04-01-0/+2
|
* Decorator for routes that require a login with one of a set of rolesGravatar Gareth Coles2018-03-30-0/+1
|
* Add PREFERRED_URL_SCHEME env var to fix `url_for()`Gravatar Gareth Coles2018-03-29-1/+3
|
* OAuth fixesGravatar Gareth Coles2018-03-29-1/+1
|
* Oauth (#45)Gravatar Nate the great2018-03-29-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Datadog TCP loggingGravatar Gareth Coles2018-03-13-0/+4
|
* Logging fixesGravatar Gareth Coles2018-03-10-2/+2
|
* Logging with PapertrailGravatar Gareth Coles2018-03-10-0/+5
|
* Change 418 error descriptionGravatar JoeBanks132018-03-01-1/+1
|
* Add error messages (#30)Gravatar Joseph2018-02-28-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* API schema validation decorator #yzuf (#15)Gravatar Gareth Coles2018-02-16-2/+8
| | | | | | | | | | * API schema validation decorator * Remove stray comma * Remove unnecessary conditional * Only cast to list when needed to
* Add some constants for our rolesGravatar Gareth Coles2018-02-15-0/+6
| | | | These will be important later
* RethinkDB API Views #yqhgGravatar lmn2018-02-13-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Asana integration (#7)Gravatar Gareth Coles2018-02-11-0/+1
| | | | | | * Event dispatching and webhook sending * snekchek
* Base API route and error codes enumGravatar Gareth Coles2018-02-09-0/+8