aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db
Commit message (Collapse)AuthorAgeFilesLines
* Added support for http callbacks on processingJoar Wandborg2012-09-262-2/+24
| | | | | Sends an HTTP POST request back to an URL given on submission to the API submit view.
* Added client registration caps to OAuth pluginJoar Wandborg2012-09-212-7/+13
| | | | | | | | | | | | | | | | | | | THE MIGRATIONS SUPPLIED WITH THIS COMMIT WILL DROP AND RE-CREATE YOUR oauth__tokens AND oauth__codes TABLES. ALL YOUR OAUTH CODES AND TOKENS WILL BE LOST. - Fixed pylint issues in db/sql/migrations. - Added __repr__ to the User model. - Added _disable_cors option to json_response. - Added crude error handling to the api.tools.api_auth decorator - Updated the OAuth README. - Added client registration, client overview, connection overview, client authorization views and templates. - Added error handling to the OAuthAuth Auth object. - Added AuthorizationForm, ClientRegistrationForm in oauth/forms. - Added migrations for OAuth, added client registration migration. - Added OAuthClient, OAuthUserClient models. - Added oauth/tools with require_client_auth decorator method.
* Style fixesJoar Wandborg2012-09-181-0/+1
|
* Fixed collection sidebar for media_home to user collection.url_for_self ↵Aaron Williamson2012-09-181-1/+1
| | | | instead of incorrectly getting the session user
* Added default for 'collected' column to migrationAaron Williamson2012-09-181-1/+1
|
* Fixed migrations for Collection and CollectionItem tablesAaron Williamson2012-09-181-2/+5
|
* Added migrations for Collection and CollectionItem tablesAaron Williamson2012-09-181-1/+30
|
* Fixed collections migration to add 'collected' column to media_entries ↵Aaron Williamson2012-09-181-2/+2
| | | | instead of 'collections'
* Added basic collection functionalityAaron Williamson2012-09-185-5/+135
|
* Fixed testsJoar Wandborg2012-09-151-1/+1
| | | | | - Adapt tests to new global_config arg for run_dbupdate - Account for [plugins] not being set in config
* Add OAuth models, plugin DB migrations, api_authJoar Wandborg2012-09-131-4/+13
|
* Fixed a UnicodeError in the sql.models.MediaEntryJoar Wandborg2012-08-031-1/+3
| | | | | The __repr__() call would crash the process when it tried to convert an unicode title to ASCII for terminal/logfile output.
* Moving the "dependency injection printer tools" over to tools/common.pyChristopher Allan Webber2012-07-141-8/+2
|
* Panel improvementsJoar Wandborg2012-07-112-1/+21
| | | | | | | | | | - Added progress meter for video and audio media types. - Changed the __repr__ method of a MediaEntry to display a bit more useful explanation. - Added a new MediaEntry.state, 'processing', which means that the task is running the processor on the item currently. - Fixed some PEP8 issues in user_pages/views.py - Fixed the ATOM TAG URI to show the correct year.
* Minor improvements to the processing panelJoar Wandborg2012-07-101-2/+2
| | | | | | - It is now possible to actually see what's processing, due to a bug fix where __getitem__ was called on the db model. - Removed DEPRECATED message from the docstring, it wasn't true.
* Prevent non-Unicode SQLAlchemy warnings in most submission tests.Brett Smith2012-07-082-3/+3
| | | | This commit makes test_submission mostly warning-clean.
* First migration fix: commit after each migration.Elrond2012-06-141-0/+2
| | | | | | | | | | | | sqlite doesn't like complex changes (alter table) to happen inside a transaction that has already done other things. And really, each migration should say "I'm done" and commit its changes. This is not the full story, but it's the core of it. Specifially the migration framework should probably do a rollback "just in case" after each migration.
* FIXED SQL MIGRATION #2Joar Wandborg2012-06-102-3/+5
|
* Added SQL migrations for email notificationsJoar Wandborg2012-06-101-2/+14
|
* Merge remote-tracking branch ↵Joar Wandborg2012-06-103-0/+13
|\ | | | | | | | | | | | | 'is_derek/bug405_email_notifications_for_comments' into notifications-merge Conflicts: mediagoblin/db/mongo/migrations.py
| * Merge branch 'master' into derek-moore-bug405_email_notifications_for_commentsChristopher Allan Webber2012-03-186-18/+133
| |\ | | | | | | | | | | | | Conflicts: mediagoblin/db/mongo/migrations.py
| * | Added wants_comment_notification to sql modelDerek Moore2012-03-151-0/+1
| | |
| * | These are changes for issue #405, add email comment notification.Derek Moore2012-03-152-0/+11
| | |
* | | added support for original audio download; renameJakob Kramer2012-05-201-1/+19
| | | | | | | | | | | | Renamed `ogg' to `webm_audio' in core__file_keynames
* | | Cleanup sql session after request. ALWAYS!Elrond2012-04-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cleanup could be missed if the request handling code in app.py:__call__ exits early (due to exception, or due to one of those early "return"s). So to make sure the sql session is cleaned up for real, wrap the whole thing in a try: finally:. Also wrote a short tool to test if the session is actually empty. The tool is currently disabled, but ready to be used.
* | | Check that the media_data tables are empty.Elrond2012-04-021-1/+8
| | | | | | | | | | | | | | | In the analyzing part also check that the media_data tables are empty (as expected) before dropping them.
* | | Add ascii and audio tables/migration data.Elrond2012-04-022-1/+23
| | | | | | | | | | | | Well, and if it's not needed, drop it again. ;)
* | | Cleanup unused media_data tables and migration info.Elrond2012-04-021-6/+34
| | | | | | | | | | | | | | | | | | After converting everything, check what is actually used in the db. For media_types that are not used, drop all the media_data tables and remove the migration info.
* | | Mongo -> SQL conversion tool: UI improvementsElrond2012-04-021-16/+28
| | | | | | | | | | | | | | | | | | Output some headers while converting things. And indent some info. Also some DRY things.
* | | Fixed an issue where orphaned comments breaks the importJoar Wandborg2012-04-021-5/+11
| | |
* | | Merge remote-tracking branch 'refs/remotes/elrond/sql/final'Christopher Allan Webber2012-04-011-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mediagoblin/tests/test_submission.py Also, WHOO SQL SWITCHOVER PARTY! ASCII DANCE PARTY /_o_/ \ / \o_ o ( _|_ ) //) /\ / o \ /| /| *BMCH BMCH BMCH BMCH* % /_o_/ HHHYAAaaaaa /_ / / % AAAAAHAHAHAHAHHHAAHA ,, .------ o_o ;; /\\ \ $ __ '\/ || // \\ # /_/ \// // //\\ \ ) \\ \ % \\ \\_____\ | ) //------- /_/_ // // SWITCH YOUR DATABASE FLIP A FUKKEN BOOLEAN % __________ .-' '-. .' '. .' _--_ _--_ '. / / (_). / (_). \ . | | | | . | ._____, ._____, | | ____________________ | | | | | ' \ / ' \ '. .----./ / \ '._ / / / '. '--------' .' '._ _.' '----------'
| * | | Finally enable SQL for everybody!Elrond2012-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This switches the whole source code over to use sql instead of mongodb. It's a pretty easy change, but changes nearly the complete way things work. Hopefully everythong works!
* | | | Switch JSONEncoded from VARCHAR to TEXTElrond2012-04-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JSON fields are really "dumb stuff in here" fields. They are not intended to get indexed or anything. And they can get large. For example the exif_all field in one of my simple tests is nearly 7 kB large. Although VARCHAR might work, TEXT feels just better as the storage type.
* | | | And remove some now useless methods.Elrond2012-03-291-36/+0
| | | |
* | | | Remove the DictReadProxy thing.Elrond2012-03-291-47/+4
| | | | | | | | | | | | | | | | And some other stuff, that the converter does not need.
* | | | Fix some simple errors.Elrond2012-03-292-4/+5
| | | |
* | | | Change models to a _v0 suffix.Elrond2012-03-292-48/+50
| | | | | | | | | | | | | | | | | | | | And add the image and video media_data tables. And start to rewrite the convert tool.
* | | | Make a copy of models for v0.Elrond2012-03-291-0/+375
|/ / /
* | | Drop debug from migration.Elrond2012-03-251-2/+0
| | |
* | | Cleanup mongo->sql converter.Elrond2012-03-251-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | 1. No need to drop media_data['exif'], we only have and want media_data['exif_all']. 2. Use media['_id'] instead of media._id (better not use dot-notation on mongo objects in such a low level tool).
* | | Migration fixup: Drop empty exif_all.Elrond2012-03-251-1/+7
| | | | | | | | | | | | | | | If the exif info is totally empty, do not add it at all to the media_data dict in mongo.
* | | Create migration to move exif data around in media_data.Elrond2012-03-251-0/+25
| | | | | | | | | | | | | | | | | | Move media_data['exif']['clean'] to media_data['exif_all'] drop media_data['exif']['useful'] drop media_data['exif']
* | | Fix cyclic import issue.Elrond2012-03-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Oh well: tools.exif -> processing -> db.util -> db.models -> db.mixin -> tools.exif So import tools.exif locally in exif_display_iter()
* | | Create MediaEntry.exif_display_iter()Elrond2012-03-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | MediaEntry.media_data.exif_all will contain all the "clean" EXIF data. MediaEntry.exif_display_iter() is an iterator that fetches the most interesting entries for display from that data.
* | | New media_data row needs to know its MediaEntry's id.Elrond2012-03-221-1/+2
| | | | | | | | | | | | | | | | | | | | | When creating a new media_data row, the new row needs to know the MediaEntry it is associated with. I have no idea, why this worked before at all. Maybe some implicit tricks by sqlalchemy?
* | | Add index=True for some columns.Elrond2012-03-211-6/+7
| | | | | | | | | | | | | | | These are the columns that seem to make the most sense to have an index on them.
* | | Finally load all models.Elrond2012-03-211-2/+1
| | | | | | | | | | | | | | | Load all models for the media_types. This was stopped by a celery problem. But that is now fixed.
* | | Create load_models().Elrond2012-03-203-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Import "Base" from base instead of models.Elrond2012-03-202-4/+3
| | | | | | | | | | | | | | | Import the "Base" class for models from db.sql.base instead of db.sql.models.
* | | Disable query logging for now, so we get nicer logsElrond2012-03-201-1/+1
| |/ |/| | | | | | | | | As the queries are quite verbose, disable them for now. Reenabling them should be done in the central logging config, which is another story for celery and bin/gmg.