aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/user_pages
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor media_collectSebastian Spaeth2012-12-211-85/+76
| | | | | | | | | | | Remove lots of MOngolisms. Refactor this to remove some indentation levels. Don't do: if success: ... if success: .... if success: ...
* webob.HTTPFound --> MG.tools.redirectSebastian Spaeth2012-12-211-5/+3
| | | | | | Transition away from webob. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Move DBModel._id -> DBModel.idSebastian Spaeth2012-12-212-14/+14
| | | | | | | | | | | | | | | | | | | | | | | We were refering to model._id in most of the code base as this is what Mongo uses. However, each use of _id required a) fixup of queries: e.g. what we did in our find() and find_one() functions moving all '_id' to 'id'. It also required using AliasFields to make the ._id attribute available. This all means lots of superfluous fixing and transitioning in a SQL world. It will also not work in the long run. Much newer code already refers to the objects by model.id (e.g. in the oauth plugin), which will break with Mongo. So let's be honest, rip out the _id mongoism and live with .id as the one canonical way to address objects. This commit modifies all users and providers of model._id to use model.id instead. This patch works with or without Mongo removed first, but will break Mongo usage (even more than before) I have not bothered to fixup db.mongo.* and db.sql.convert (which converts from Mongo to SQL) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Fix user collection gallerySebastian Spaeth2012-12-051-13/+9
| | | | | | | | | | | We were fetching the user collection gallery by slug only, so if two users had the same collection slug, we would not have been sure which one we'd get. Fix this by explicitly only fetching the specific user's collections. Also switch over the view function to make use of the new active_user_from_url decorator that fetches the User() object for us. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Switch over the user gallery to the active_user_from_url decoratorSebastian Spaeth2012-12-051-13/+10
| | | | | | | | This switches the user gallery page over to use the new decorator, and cleans up the queries to be in proper sqlalchemy format rather than the old mongo format. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* make media_manager a property of MediaEntry in mixin.pySebastian Spaeth2012-12-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | In all cases where get_media_manager(_media_type_as_string) was called in our code base we ultimately passed in a "MediaEntry().media_type" to get the matching MEDIA_MANAGER. It so makes sense to make this a function of the MediaEntry rather than a global function in mediagoblin.media_types and passing around media_entry.media_type as arguments all the time. It saves a few import statements and arguments. I also made it so the Media_manager property is cached for subsequent calls, although I am not too sure that this is needed (there are other cases for which this would make more sense) Also add a get_media_manager test to the media submission tests. It submits an image and checks that both media.media_type and media.media_manager return the right thing. Not sure if these tests could not be merged with an existing submission test, but it can't hurt to have things explicit. TODO: Right now we iterate through all existing media_managers to find the right one based on the string of its module name. This should be made a simple dict lookup to avoid all the extra work. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Fixed attachmentsJoar Wandborg2012-10-231-1/+1
|
* Fixed 404 page under werkzeug.routingJoar Wandborg2012-10-141-1/+1
| | | | | - Removed ?lang=<langcode> feature due to incompatibility with werkzeug routes in the current state of the architecture.
* Switched most stuff over from RoutesJoar Wandborg2012-10-141-45/+65
| | | | | | | | | | Removed the Routes routing functionality and replaced it with werkzeug.routes. Most views are functional. Known issues: - Translation integration with the request object is not yet figured out. This breaks 404 pages.
* Replaced all request.POST with request.form, ...Joar Wandborg2012-09-291-11/+11
| | | | | - Fixed error handling in OAuth plugin - Changed request.POST file fields to request.files
* Style fixesJoar Wandborg2012-09-181-21/+33
|
* Fixed post-collect redirect to always take user to image collected.Aaron Williamson2012-09-181-1/+1
|
* Reference collection creator through already-existing collection_item's ↵Aaron Williamson2012-09-181-1/+1
| | | | foreign key
* Added basic collection functionalityAaron Williamson2012-09-183-5/+316
|
* Panel improvementsJoar Wandborg2012-07-111-7/+17
| | | | | | | | | | - 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.
* Merge branch 'master' into 201207-testfixesBrett Smith2012-07-081-1/+12
|\
| * fixing bug #255 as Joar and CWebber ask me to do :)Jorge Araya Navarro2012-06-281-1/+12
| |
* | Prevent non-Unicode SQLAlchemy warnings in most submission tests.Brett Smith2012-07-081-8/+8
|/ | | | This commit makes test_submission mostly warning-clean.
* Fixed some comment notification code for compliance with SQLJoar Wandborg2012-06-102-12/+15
| | | | * Pulled instance name in notification email from config
* Merge remote-tracking branch ↵Joar Wandborg2012-06-102-0/+61
|\ | | | | | | | | | | | | 'is_derek/bug405_email_notifications_for_comments' into notifications-merge Conflicts: mediagoblin/db/mongo/migrations.py
| * Updates to send email comments, included translation, better validation.Derek Moore2012-03-251-9/+9
| |
| * Merge branch 'master' into derek-moore-bug405_email_notifications_for_commentsChristopher Allan Webber2012-03-182-1/+5
| |\ | | | | | | | | | | | | Conflicts: mediagoblin/db/mongo/migrations.py
| * | These are changes for issue #405, add email comment notification.Derek Moore2012-03-152-0/+61
| | |
* | | Panel: Find "unprocessed" not "processing" entries.Elrond2012-03-211-1/+1
| |/ |/| | | | | | | | | Our entries in the queue are marked as "unprocessed" and not as "processing" as the panel code wanted it to be. So search for the correct string.
* | When media is deleted, delete associated comments too.Brett Smith2012-03-171-0/+4
| | | | | | | | | | | | The actual code is just a simple for loop; there might be a better implementation but this is a fine start. I also extended test_delete to check this too.
* | More/better translation.Elrond2012-03-171-1/+1
|/ | | | | | - Try to preserve some translations (somehow). - Mark "Tagged with" again for translation. - Do not translate the empty string
* Dot-Notation: MediaComment and some random placesElrond2012-02-261-4/+4
|
* Drop pre-rendered html: MediaComment.content_htmlElrond2012-02-181-2/+0
| | | | | | | | | | | After a bit of discussion, we decided to drop the pre-rendered html from the database and render it on the fly. In another step, we will use some proper caching method to cache this stuff. This commit affects the MediaComment.content_html part.
* Drop pre-rendered html: MediaEntry.description_htmlElrond2012-02-181-1/+1
| | | | | | | | | | | After a bit of discussion, we decided to drop the pre-rendered html from the database and render it on the fly. In another step, we will use some proper caching method to cache this stuff. This commit affects the MediaEntry.description_html part.
* Fix copyright statements; add LICENSE for EXIF.pyWill Kahn-Greene2012-02-081-1/+1
|
* It's 2012 all up in hereChristopher Allan Webber2012-02-024-4/+4
|
* As per spec, we permit to have more then 1 hubMichele Azzolari2012-01-121-4/+5
|
* As suggested by Elrond, we use only one settingMichele Azzolari2012-01-121-1/+1
|
* Added PuSH capabilityMichele Azzolari2012-01-111-6/+14
|
* Fixed #724 and added extra infos to the atom feed (author uri and links to ↵Michele Azzolari2012-01-101-4/+24
| | | | the html version of each entry)
* Turn media.get_uploader into a propertyElrond2011-12-271-1/+1
| | | | | | | sqlalchemy gives autoloading (hopefully caching) link to other objects as properties. So turn get_uploader on the current mongo based stuff into a property to ease transition.
* Replace media.get_uploader()._id by media.uploaderElrond2011-12-241-1/+1
| | | | | | media.get_uploader()._id loads a complete user object without actually needing it, because media.uploader already has the id!
* Merge jQuery branch, resolve conflictsJef van Schendel2011-12-131-1/+1
|\
| * Lots of changes to media page; rearranged things, added new styles, added ↵Jef van Schendel2011-12-091-1/+1
| | | | | | | | jquery bits, gave the comment section a refresh
* | Dot-Notation for MediaEntry.media_typeElrond2011-12-051-1/+1
| |
* | Dot-Notation for Users.is_adminElrond2011-12-051-1/+1
| |
* | Dot-Notation for Users.statusElrond2011-12-051-2/+2
| |
* | Dot-Notation for Users.usernameElrond2011-12-051-2/+2
| |
* | Changed comment error message wording slightly. Btw, should we translate ↵Jef van Schendel2011-12-031-2/+2
|/ | | | these things?
* Merge remote-tracking branch 'remotes/jwandborg/master'Christopher Allan Webber2011-11-241-1/+5
|\
| * Merge branch 'video_gstreamer-only'Joar Wandborg2011-11-211-1/+5
| |\ | | | | | | | | | | | | | | | Conflicts: mediagoblin/db/migrations.py mediagoblin/submit/views.py
| | * Multimedia support - Commiting from a not yet finished state - Details belowJoar Wandborg2011-09-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * DONE Initially testing with arista ** DONE Video display templates *** TODO Multi-browser support ** TODO Video thumbnails ** TODO Link to original video ** TODO Video cropping Also contains a lot of "debug" print's
* | | Rename MediaEntry.uploader() to .get_uploader()Elrond2011-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The .uploader() method conflicts with the uploader database field. As we're moving to .FIELD for db field access, this is a relevant conflict. So renaming .uploader() to .get_uploader()
* | | Wrap long line.Elrond2011-11-221-1/+2
| | | | | | | | | | | | Nothing else.
* | | Added a message noticing the user the image has been successfullyPablo J. Urbano Santos2011-11-221-1/+2
| | | | | | | | | | | | deleted.