aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/init/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.Ben Sturmfels2021-03-051-3/+3
|
* Fix tests post-alembic-migration-changes.Christopher Allan Webber2016-03-261-3/+9
| | | | | * mediagoblin/init/__init__.py (setup_database): Update to run alembic migrations, skip the old legacy migrations.
* Attach the MediaGoblinApp to the engine, and provide a way for models to accessChristopher Allan Webber2014-12-031-4/+6
| | | | | | | 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!
* Starting to deprecate the app_config, global_config by attaching stuff to appChristopher Allan Webber2014-12-031-1/+6
| | | | | | - app.global_config, app.app_config - making setup_crypto use app.app_config - setting app.workbench_manager
* Improved test runtime from 352 seconds to 59 seconds by implementing an ↵Emily O'Leary2013-06-251-5/+9
| | | | 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.
* Various fixes to plugin assetlinking command.Christopher Allan Webber2013-05-231-2/+2
| | | | | | | Actually trying to run the command helps figure out what needs to be fixed :) This commit sponsored by Justin Nichol. Thank you!
* Work towards getting plugin static linking/serving to workChristopher Allan Webber2013-05-231-1/+1
| | | | | | | | | - add link_plugin_assets. For now, incorrectly running from ./bin/gmg theme assetlink... uh, will fix ;) - Update paste and config_spec.ini configs to handle the locations and serving of the plugins' static resources This commit sponsored by Marko Dimjašević. Thank you!
* Start of ability to have plugins provide static resources!Christopher Allan Webber2013-05-231-0/+7
| | | | | | | | | | Note I have not tested any of this yet ;) But we're already on our way: - We've got docs - The hook is there Lots to do still though. But, progress! :) This commit sponsored by Laura Arjona Reina. Thanks larjona!
* Remove beaker stuff from the code.Brett Smith2013-03-241-15/+0
| | | | This is all obsoleted by It's Dangerous.
* Move workbench into tools directory.Elrond2013-01-171-1/+1
|
* RIP out mongoSebastian Spaeth2012-12-251-5/+3
| | | | | | | | | 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
* en_US is always availableSebastian Spaeth2012-12-021-2/+2
| | | | | | | | | | | We were using "en" as fallback only when no preferred language matched. This is obviously bad. Always insert en_US as available locale, so we can match it with the accept_languages. Don't set available_locales as mg_global, per discussion with paroneaya, make it a global var in translate.py Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Honor user's browser language (#558)Sebastian Spaeth2012-12-021-0/+6
| | | | | | | | | | | | | Previously we would attempt to satisfy the user's first language preference, immediately falling back to english if that was not possible. Now, we will get the best match of the user's preferred languages. This requires storing the available locales on app startup, so we have mg_globals.available_locales ready to compare them against the list of preferred user languages. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Flatpages first passWill Kahn-Greene2012-07-161-21/+24
| | | | | | | | | | This fixes the template loader so that it can load plugin templates. This adds code for registering template paths so that plugins can add their own templates. This adds the base code for the flatpagesfile plugin. It doesn't serve pages, yet, but it's pretty close.
* Add the theme domain to the application's staticdirectorChristopher Allan Webber2012-07-141-4/+8
|
* Update staticdirect stuff so it can handle "domains" of staticdirectionChristopher Allan Webber2012-07-141-2/+2
|
* Kill MultiRemoteStaticDirect... nobody was really using it anywayChristopher Allan Webber2012-07-141-10/+4
| | | | | Since we're adding the new "domain" staticdirect system we should clean this up.
* Moving staticdirect to tools/Christopher Allan Webber2012-07-141-1/+1
|
* Themes are now registered and can have their templates loaded properlyChristopher Allan Webber2012-07-141-5/+19
|
* Create load_models().Elrond2012-03-201-1/+4
| | | | | | | | | | | | So all models are ready when connecting to the db and so our "db" object has all models listed on it, create a function to load all models from the media_types, etc. Call it in setup_database() Problem: This gives celery warnings, because celery is imported before being setup properly. No idea how to fix this now. So media-type loading is excluded from load_models for now.
* It's 2012 all up in hereChristopher Allan Webber2012-02-021-1/+1
|
* Factor out check_db_migrations_currentElrond2012-01-011-21/+3
| | | | | | | | | | When initializing the database connection the current mongo based setup checked for new migrations and warned about them. This was mongo specific so factor'd it out into a more generic check_db_migrations_current function in the mongo backend. Also created a dummy one in the sql backend.
* Move db/migrations.py -> db/mongo/migrations.pyElrond2011-12-201-1/+1
| | | | And change references.
* has_key is deprecated, converting uses to use "in" operator.Nathan Yergler2011-10-011-2/+2
|
* Whitespace and formatting cleanup.Nathan Yergler2011-10-011-7/+11
| | | | | | | * Removed trailing whitespace * Line length < 80 where possible * Honor conventions on number of blank lines * Honor conventions about spaces around :, =
* Merge branch 'i507_beaker_cache'Christopher Allan Webber2011-09-051-0/+16
|\
| * Basic beaker caching functionality added to the application.Christopher Allan Webber2011-08-231-0/+16
| |
* | 508. Updates copyright/license informationWill Kahn-Greene2011-09-011-1/+1
|/
* Storage config: Drop all Backward CompatibilityElrond2011-08-091-3/+2
| | | | | Chris Webber says not to care about backward compatibility at this stage. So drop the last bits.
* storage Config: Stop being backward compatible (beginning).Elrond2011-08-091-10/+2
| | | | | Chris Webber says "no backward compatibility for this". So start removing the backward compat stuff.
* Storage Config: Use own sectionElrond2011-08-091-2/+16
| | | | | | | | | | Instead of configuring storage X by parameters in the main section "X_class = backend" and "X_param = value", use a new section in the config: "[storage:X]" and use "class = backend" and "param = value" there. This is the beginning, it includes a try at being backward compatible. But that try isn't really fully useful anyway.
* Let users know when their migrations are from the future :OChristopher Allan Webber2011-07-301-3/+10
|
* Move setting up of storage into init/__init__.pyElrond2011-07-181-0/+14
| | | | | | | Factoring out this one should be the last one needed to rewrite the celery setup. The idea is to not setup the whole app, but just call a bunch of individual setup_* functions and be done.
* Move application level setup of database to init/Elrond2011-07-171-0/+29
| | | | | | Setting up the database now involves checking the migrations status and setting up the globals. Moved all of that into init/__init__.py:setup_database().
* Factor setup_workbench into init submodule.Elrond2011-07-071-0/+10
|
* Let setup_global_and_app_config call setup_globalsElrond2011-07-051-0/+5
| | | | | | Let setup_global_and_app_config set the global and app config in the mg_globals already. This way, the config is available to everyone very early.
* Create setup_global_and_app_configElrond2011-07-041-0/+13
| | | | | | | Moving the config reading and error reporting from app.py to init/__init__.py. Straight forward. This also fixes the duplicated exceptions.
* Move setting up of staticdirector to init submoduleElrond2011-07-041-0/+21
| | | | | This duplicates some exceptions, which will be fixed very soon.
* Move get_jinja_loader to init submodule.Elrond2011-07-021-0/+18
|
* Start mediagoblin.initElrond2011-07-021-0/+15