| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This help a Guix package to locate the basic static assets.
|
| |
|
| |
|
|
|
|
|
| |
Incredibly, it looks like none of our documentation has to change taking
this route...!
|
|
|
|
|
|
|
| |
This allows SQLAlchemy models to gain access to app-level configuration
without the need for global variables.
This commit sponsored by Peter Hogg. Thank you, Peter!
|
| |
|
|
|
|
|
|
| |
- app.global_config, app.app_config
- making setup_crypto use app.app_config
- setting app.workbench_manager
|
|
|
|
|
|
|
|
|
| |
This means that we have a really convenient way to make sure that you
have a context/request that threads its way through the application,
where everything needed gets "shut down" appropriately by the end.
You always get a context object via a context manager! And by the time
you're done with it, things should be cleaned up.
|
| |
|
| |
|
|
|
|
|
|
| |
This allows you to generate a "context" object that gets threaded
throughout the application... this object should keep track of the same
things that currently we use global variables for.
|
|
|
|
| |
This commit sponsored by Tryggvi Björgvinsson. Thank you!
|
|\
| |
| |
| |
| | |
Conflicts:
setup.py
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Has some issues, will iteratively fix!
Conflicts:
mediagoblin/gmg_commands/__init__.py
mediagoblin/gmg_commands/deletemedia.py
mediagoblin/gmg_commands/users.py
mediagoblin/oauth/views.py
mediagoblin/plugins/api/views.py
mediagoblin/tests/test_api.py
mediagoblin/tests/test_edit.py
mediagoblin/tests/test_oauth1.py
mediagoblin/tests/test_util.py
mediagoblin/tools/mail.py
mediagoblin/webfinger/views.py
setup.py
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Changes:
* Paste#http -> Gunicorn
* Paste#urlmap and Paste#static -> werkzeug.wsgi.SharedDataMiddleware
|
| |/
|/|
| |
| | |
... it's presently causing session issues :\
|
|/ |
|
| |
|
|
|
|
|
|
| |
Basically, it's shuffling around the notifications stuff.
This commit sponsored by Günter Kraft. Thank you!
|
|\
| |
| |
| |
| |
| | |
Conflicts:
mediagoblin.ini
mediagoblin/tests/test_mgoblin_app.ini
|
| | |
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
in-memory sqlite DB and including an option to run migrations on this newly created database by adding a config option called run_migrations to the config_spec and passing it along in app.py to the setup_database function.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
mediagoblin/app.py
mediagoblin/auth/forms.py
mediagoblin/auth/tools.py
mediagoblin/db/migrations.py
mediagoblin/db/models.py
mediagoblin/edit/views.py
mediagoblin/plugins/basic_auth/tools.py
mediagoblin/tests/test_edit.py
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Added request.notifications
- Email configuration fixes
- Set config_spec default SMTP port to `0` and switch to SSL/non-SSL
default if `port == 0`
- Added email_smtp_use_ssl configuration setting
- Added migrations for notification tables
- Added __repr__ to MediaComment(Mixin)
- Added MediaComment.get_entry => MediaEntry
- Added CommentSubscription, CommentNotification, Notification,
ProcessingNotification tables
- Added notifications.task to celery init
- Fixed a bug in the video transcoder where pygst would hijack the
--help argument.
- Added notifications
- views
- silence
- subscribe
- routes
- utility methods
- celery task
- Added half-hearted .active comment CSS style
- Added quick JS to show header_dropdown
- Added fragment template to show notifications in header_dropdown
- Added fragment template to show subscribe/unsubscribe buttons on
media/comment pages
- Updated celery setup tests with notifications.task
- Tried to fix test_misc tests that I broke
- Added notification tests
- Added and extended tests.tools fixtures
- Integrated new notifications into media_home, media_post_comment views
- Bumped SQLAlchemy dependency to >= 0.8.0 since we need polymorphic for
the notifications to work
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
no_auth config option. allows instance to be run w/o authentication
|
|
|
|
|
|
| |
Needs documentation though... that's coming next :)
This commit sponsored by Luca Tius. Thanks Luca!
|
|
|
|
| |
This commit sponsored by David Collins. Thank you!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not the working solution, but getting there conceptually. Basically
we'll have a key with the view and the template as a tuple which is
the context hook that anyone can attach to.
However, some changes have still to be made:
- The unit test doesn't work yet and contains a set_trace ;)
- We'll probably switch the "view" component from being the callable
to the "urlgen"'able name per Elrond's suggestion
- Found a bug in unit tests related to running custom apps for
different configs... hm. I need to fix this!
Nonetheless, making progress.
This commit sponsored by... wait a minute... Christopher Webber?!
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
1. Our session cookies only need to be available to http, so
mark them appropiately.
2. Send the cookie to the subpath for mediagoblin.
And instantiate a session manager on the app, once.
|
|
|
|
| |
This is all obsoleted by It's Dangerous.
|
|
|
|
| |
This is a contribution to #668.
|
|
|
|
|
| |
Implement the basic infrastructure for using itsdangerous
in mediagoblin. Usage instructions will follow.
|
|
|
|
|
|
|
| |
- Added wrap_wsgi, celery_setup, celery_logging_setup hooks
- Updated raven plugin docs
- Updated production considerations docs
- Added raven logging setup
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The move to werkzeug routing went pretty smooth, but one thing was
broken by accident: URLs without final slash result in a 301
werkzeug.routing.RequestRedirect response. We displayed it as a generic
error page rather than actually sending the redirect. Do that. One thing
it does though is to skip all meddlewares, which should be OK for a 301
response, but might need rework if we decide otherwise. With this, 301
responses with lacking final slash are unbroken again.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
|
|
|
|
| |
Since sqlalchemy is providing our database abstraction and we have
moved away from Mongo as the underlying database, it is now time to
simplify things and rip out mongo. This provides the bulk of the
changes, and can stand on its own. There are some followup tasks
that can be done, such as removing now unneeded abstraction layers,
e.g. db.sql.fake.py
|
|
|
|
|
|
|
|
|
|
|
| |
MGRoute subclasses Rule():
Rule doesn't have a way to tag extra data, like the
controller function, we need. So MGRoute has a new
attribute .gmg_controller, which holds this.
Rewrite everything to use this new Rule variant and drop
all the other stuff that mapped endpoints to controller
functions, mostly.
|
|
|
|
|
|
|
| |
This stops a cyclic import.
Move add_route, mount and endpoint_to_controller into
tools/routing.py and change all callers.
|
|
|
|
|
|
| |
Move some things out of app.py into functions in
routing.py. This makes app.py a bit more readable and
allows us to rewrite routing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the webob->werkzeug transition, controller functions can raise
werkzeug.HttpExceptions. We need to catch these in app.py when calling
the controller and handle them, rendering the corresponding error Response()
object. For consistency, we also want to allow meddleware functions to
raise HttpExceptions (e.g. the csrf meddleware needs to complain about lack
of cookies), so wrap the request and response parts of the meddleware too.
Finally, the urlmap.match() can also raise HttpExceptions, so we give it the
same treatment (render_http_exception). I am not sure, if we do not need to
handle the Redirect exception there in any different way though...
The new function render_http_exception makes use of the render_error infrastructure
to return a nicely templated error page. It also checks if the stock error
messages was used in cases where we have localizations (403, 404) and use those.
It is now possible to do things like "raise Forbidden(_('You suckr'))" or
raise NotFound(_('where is my left show again')) if you want to return
customized error messages to the user.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
|
|
|
| |
It is killing testsuite output by drowning out all signals. It should
be sufficient to state in the pluginmanager that routes have been added,
if we need that kind of output.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
|
|
|
|
|
| |
Remove the aliases we provided for webob compatability as webob is
now gone. Grepped the code base to check for occurences of the old
parameters to be safe. Keep request.GET attribute as alias for
request.args as it is often used and django is also using that
attribute.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|