4939 Commits

Author SHA1 Message Date
Jessica Tallon
3588522606 Fix #1054 - Add missing attributes to Activity.serialize 2014-12-08 14:46:48 +00:00
Jessica Tallon
a5c09c50c0 Fix OAuth length problems in clients by removing that constraint 2014-12-08 13:44:33 +00:00
Jessica Tallon
8d8fdfd1b8 Partial fix #1048 - Don't require as long nonce 2014-12-05 17:22:55 +00:00
Jessica Tallon
5b7e6bb8c2 Fix #1049 - name renamed to displayName for Location 2014-12-05 14:04:18 +00:00
Christopher Allan Webber
7b808c1fad There's absolutely no reason for a Session().commit object mirrored onto Session() :)
Thanks for catching, Elrond :)
2014-12-03 15:40:58 -06:00
Christopher Allan Webber
8379046d4a Use request.db to do a query to support a global-free view :) 2014-12-03 15:40:58 -06:00
Christopher Allan Webber
ddabf20f25 Make all mixin methods ignore mg_globals and use self._app instead
This commit sponsored by Daniel Lang.  Thank you!
2014-12-03 15:40:58 -06:00
Christopher Allan Webber
7c563e91bf Attach the MediaGoblinApp to the engine, and provide a way for models to access
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!
2014-12-03 15:40:58 -06:00
Christopher Allan Webber
5e5ea4a3e9 Use request.app.auth instead of mg_globals 2014-12-03 15:40:57 -06:00
Christopher Allan Webber
753cfc3bb9 Reforming get_jinja_env to make better use of the MediaGoblinApp 2014-12-03 15:40:57 -06:00
Christopher Allan Webber
b8e2ab2f55 Starting to deprecate the app_config, global_config by attaching stuff to app
- app.global_config, app.app_config
 - making setup_crypto use app.app_config
 - setting app.workbench_manager
2014-12-03 15:40:57 -06:00
Christopher Allan Webber
a4768df0ca Context objects now use a contextmanager (and update gmg shell to use it)
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.
2014-12-03 15:40:57 -06:00
Christopher Allan Webber
9d82dff6fb Adding query property to DatabaseMaster for forward compatibility 2014-12-03 15:40:57 -06:00
Christopher Allan Webber
f08e31522d Make "gmg shell" work with the new globals-less setup 2014-12-03 15:40:57 -06:00
Christopher Allan Webber
f7521cac34 Attach the base models to sessions and the DatabaseMaster for backwards compatibility
Really we should stop relying on that though.
2014-12-03 15:40:57 -06:00
Christopher Allan Webber
5cbdb15cdb Only conditionally import Session in db/util.py 2014-12-03 15:40:57 -06:00
Christopher Allan Webber
c060353e35 Set up request.db / app.db(_manager) depending on DISABLE_GLOBALS 2014-12-03 15:40:57 -06:00
Christopher Allan Webber
2026752120 Move the scoped_session, sessionmaker imports 2014-12-03 15:40:57 -06:00
Christopher Allan Webber
e248e1429a Some docstrings 2014-12-03 15:40:57 -06:00
Christopher Allan Webber
63f6a418d1 Return DatabaseManager or DatabaseMaster depending on DISABLE_GLOBALS
They're both similar!  One sets up sessions, one grabs sessions from a global object.
2014-12-03 15:40:57 -06:00
Christopher Allan Webber
5f3703d545 Oops, got the boolean backwards :P 2014-12-03 15:40:57 -06:00
Christopher Allan Webber
4591af32b3 Adding DatabaseManager as an alternative to DatabaseMaster
This is another step to get to a no-globals configuration.  I'm not
sure if this code works yet or not... :)
2014-12-03 15:40:57 -06:00
Christopher Allan Webber
b88ca698dd An environment variable to transition towards removing global variables 2014-12-03 15:40:56 -06:00
Christopher Allan Webber
15c86f3a57 Give our sqlalchemy objects access to their own session 2014-12-03 15:40:56 -06:00
Christopher Allan Webber
d71499004f Add context generator: first step towards removing globals from the application
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.
2014-12-03 15:40:56 -06:00
jpope777
03ff0b368e Fix #1046 - Media breaking out of container 2014-12-02 16:54:24 -06:00
Jessica Tallon
5436d980a1 Fix #1024 - Correctly set generator on Activities 2014-12-02 14:51:24 +00:00
Christopher Allan Webber
6740d03422 Change the suggested data_basedir, and fix a typo
This commit sponsored by Raimund Sacherer.  Thank you!
2014-12-01 12:45:07 -06:00
jpope777
fd90f4c273 Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin 2014-12-01 10:56:55 -06:00
jpope777
b5ced2db1b fix #1000 - Button style in Report file dialogue 2014-12-01 10:56:18 -06:00
Jessica Tallon
fbb3ee5041 Fix #658 and #974 - Rollback database on_return of task 2014-12-01 13:39:35 +00:00
Jessica Tallon
1c8f52daee Fix #1040 - Comments should have published attribute 2014-11-27 10:13:21 +00:00
Christopher Allan Webber
692e8e7848 This import_export stuff is mongodb days leftovers. Removing!
This commit sponsored by Ray Redd.  Thanks!
2014-11-26 16:44:28 -06:00
Berker Peksag
9d85dcdf11 Fix unicode handling in "gmg addmedia". 2014-11-22 18:12:19 +00:00
Jessica Tallon
9c602458d8 Fix #1025 - Make API IDs IRIs 2014-11-21 13:30:31 +00:00
Christopher Allan Webber
f44bd7dc87 Patch by Sturm: explain permissions on media directories in deployment docs
This should hopefully reduce the amount that users are confused by their
media files not being available.
2014-11-20 11:36:29 -06:00
Jessica Tallon
34b755f43d Fix #1039 - Fix typo in user model 'oublished' to 'published' 2014-11-20 10:14:43 +00:00
Jessica Tallon
dd73391663 Fix #1021 - Skip broken activities which caused feed/inbox to 500 2014-11-20 09:46:37 +00:00
Jessica Tallon
45e687fcf8 Fix #1023 - Make timestamps in API timezone aware 2014-11-19 10:49:53 +00:00
Jessica Tallon
c511fc5e5e Fix User and MediaEntry serialize and add serialize to models which need it 2014-11-04 10:42:31 +00:00
Jessica Tallon
4fc1671d84 Fix #1016 - Covert the timestamp from seconds to datetime object 2014-11-04 10:42:31 +00:00
Christopher Allan Webber
aa68730237 Fix airy to properly work with the "forced to the bottom of the page" footer 2014-10-30 14:27:26 -05:00
Christopher Allan Webber
9a248310f7 Remove ^P character 2014-10-30 14:17:40 -05:00
Christopher Allan Webber
d46267da46 Clarifying the json processing callbacks even further 2014-10-30 13:56:55 -05:00
Rodrigo Rodrigues da Silva
770d0efa3a Fix misleading log message reported in #985. 2014-10-30 13:47:52 -05:00
Rodrigo Rodrigues da Silva
dedebd48dd Add a template hook to stl sideinfo. Fixes #940. 2014-10-30 13:30:31 -05:00
ayleph
8cf9d64328 Updates per request of moggers87 2014-10-30 11:34:23 -05:00
ayleph
c7236fd0da Unit tests
Added unit tests for lowercasify username on login.
2014-10-30 11:34:23 -05:00
ayleph
a2b3c623fd Pass validated username to check_login_simple
The login function in mediagoblin/auth/views.py grabs the username prior to
form validation. If validation passes, the pre-validated username is passed to
the check_login_simple function.

Lowercasifying of the username occurs as part of form validation. By sending
the pre-validated username, there's a chance of sending a username with
uppercase letters. This will fail to match any user ids in the database, as
all of the usernames are lowercased during the registration process.

This change sends the post-validated username to check_login_simple, so that
any username that was entered by the user with uppercase letters has a chance
to be properly lowercased before being passed.
2014-10-30 11:34:23 -05:00
Christopher Allan Webber
aa50cab0dc Template hook to allow plugin authors to add extra things to the header
Thanks to Andrew Browning for requesting this and suggesting where to
put it!
2014-10-30 11:15:19 -05:00