1263 Commits

Author SHA1 Message Date
85f2c6093d Introducing Toastr for toast notifications 2017-06-07 20:58:27 +02:00
91807ad022 Add comment to STORAGE_BACKEND config 2017-06-07 19:40:19 +02:00
5ce78a2fb3 Create <p> tag, do not use existing tags 2017-06-07 18:59:46 +02:00
31b71eb244 Escape text when presenting search results 2017-06-07 16:22:39 +02:00
1ce4654673 Autodetect timestamp format in Blender ID token expiry.
The new Blender ID uses a different timestamp format than the old one.
We can alter Blender ID, but using the ISO 8601 is a good idea anyway.
2017-06-07 09:00:51 +02:00
72cbd2ce2b Added 'repr' Jinja2 filter.
This can help with debugging, for example by showing the difference between
a string ID and an ObjectID.
2017-06-06 18:29:33 +02:00
3d273d4284 Expose Flask session to Jinja 2017-06-06 18:06:46 +02:00
d920d9e9fe Also mock .s() and .si() celery signature functions. 2017-06-06 17:35:56 +02:00
c2bc52718a Fixed string formatting in exception raising 2017-06-06 17:35:56 +02:00
c3ea8228a1 Less padding on buttons 2017-06-06 17:03:24 +02:00
5047803e3c CSS: progress-bar styling part of pillar's base 2017-06-06 17:03:24 +02:00
1c566c6259 Fixed bug in GoogleCloudStorageBlob.exists() 2017-06-06 16:35:14 +02:00
2ad8c5186c Storage backends: added exists() method
This method returns whether the file exists on the backend.
2017-06-06 15:33:05 +02:00
d6506b6402 Moved Celery CLI commands to 'manage.py celery' submodule + added extensions:
Added a 'celery queue' command, which is supposed to show queued
Celery tasks (but doesn't work quite as I'd expect).

Added a 'celery purge' command, which purges queued Celery tasks.
2017-06-06 15:05:18 +02:00
5bde262ad7 Ping Celery workers when starting up.
This makes debugging Celery/RabbitMQ/Redis issues much easier, as it
happens at application startup, rather than when we first create a Celery
task.
2017-06-02 17:33:15 +02:00
27ad3459c1 Testing: make Celery tasks execute immediately when called. 2017-06-02 16:15:46 +02:00
6f16e20bf6 Flask Request.json() is deprecated, use get_json() instead.
See http://flask.pocoo.org/docs/0.12/api/#flask.Request.json
2017-06-02 16:03:45 +02:00
3e67db50f0 Tests: added some code to easily enter the Flask app context
This can't be trivially enabled globally, since it seems to leak certain
things like authentication info between calls.
2017-06-02 16:02:18 +02:00
c7e225e81b Added a bit about Celery to the README.md 2017-06-02 11:50:02 +02:00
878bf22695 Migrated Algolia push/delete of nodes to Celery background tasks. 2017-06-02 10:44:37 +02:00
d0c30cfeca Mock Celery while testing, to prevent actual background task creation. 2017-06-02 10:44:37 +02:00
5af54237b9 Integrated Celery startup / management / config with PillarServer. 2017-06-02 10:44:37 +02:00
e7d268bde6 Algolia: Use Celery to push user updates in a background task. 2017-06-02 10:44:37 +02:00
ed4ee5228a Added Celery for background tasks.
The implementation is still rather simple, using hard-coded configuration
values. This will change in subsequent commits.

The worker can be started with "manage.py operations worker". Celery
Worker CLI options can be passed after a double dash, like this:

    ./manage.py operations worker -- -C -E
2017-06-02 10:44:37 +02:00
f152521041 Algolia user push: simplified & streamlined the code a bit. 2017-06-02 10:44:37 +02:00
2b36b4c514 PEP8 formatting 2017-06-02 10:44:37 +02:00
5f2153ae5a Sorted imports 2017-06-02 10:44:37 +02:00
22301a0e9a Removed unused import 2017-06-02 10:44:37 +02:00
96ffee49cf Update url_for statements for project redirects
Now we always point to the full project urls.
2017-06-01 17:40:16 +02:00
8c38861c2f Remove Blender Cloud specific redirects
They have been moved to the Apache config file in the blender-cloud repo.
2017-06-01 17:24:46 +02:00
80a0643747 Updated font location in README 2017-06-01 12:10:33 +02:00
92536aa7ac Renamed readme.md to README.md 2017-06-01 12:10:24 +02:00
7ac9203753 Pillar-font: added pi-link and pi-unlink 2017-06-01 12:10:00 +02:00
d67f65019e Escape HTML when displaying search results 2017-05-31 17:14:17 +02:00
a806f294b2 Some extensions to make Flamenco tests possible 2017-05-31 17:13:57 +02:00
bfbcdee926 CLI 'index_users_rebuild' should gracefully stop when Algolia isn't configured. 2017-05-31 11:03:33 +02:00
34b9be4efa Don't use str.format() when logging.
The correct way to log is to use %-formatting, and pass the format args to
the logging function. This prevents the string from being formatted at all
when the log item isn't logged anywhere (in this case, when the log level
is WARNING or higher).
2017-05-31 11:03:04 +02:00
2c78697e80 Pass extension pages to all extensions' "project settings" pages. 2017-05-31 10:35:49 +02:00
f953f1e51b Moved common Jade code for project edit pages into projects/edit_layout.jade 2017-05-31 10:35:49 +02:00
207dacf816 Reindex users that have not been deleted 2017-05-28 20:21:06 +02:00
add1c8b9b3 Make ROLES_FOR_COMMENT_VOTING a config value
This way we can override it when extending Pillar for other projects that might not require the 'subscriber' or 'demo' roles.
2017-05-28 19:04:11 +02:00
85922f4493 Fix to support missing roles key in user 2017-05-24 19:42:44 +02:00
a7d3ba24b4 Refactor cli scripts in submodules 2017-05-24 19:41:35 +02:00
10c584daab Skip user indexing if user has service group 2017-05-24 18:11:36 +02:00
fe56b04f7d Remove bottom link on sitemap 2017-05-24 18:03:49 +02:00
43d4a36a0d CLI functions for index management
When developing locally, it is important to set up a dedicated indexing backend. With these two operations functions it is now possible.
- index_users_rebuild: Clear users index, update settings and reindex all users.
- index_users_update_settings: Configure indexing backend as required by the project
2017-05-24 18:02:39 +02:00
12a8a34bdc Fixed JS injection vulnerability.
JavaScript in the user's full name or username was executed when adding
that user to a project.
2017-05-24 16:32:05 +02:00
85b6ff2d7f Use str2id(x) instead of ObjectId(x)
The latter produces an internal server error if 'x' is not a valid ObjectId,
whereas the fromer produces a 400 Bad Request.
2017-05-24 16:31:15 +02:00
4edbcd6a98 PEP8 formatting 2017-05-24 15:48:27 +02:00
2ba52e2467 Allow extensions to have a project settings page. 2017-05-24 15:48:27 +02:00