aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add FilenameMunger class to processing, with tests.Brett Smith2012-03-252-0/+36
| | | | | Munging filenames is something all media type processors want to be able to do, so I'm refactoring it out into a nice bite-sized class.
* Add tests for image processing. Check filenames and image sizes.Brett Smith2012-03-202-0/+24
| | | | | | | This test helps verify that bug #261 is actually fixed. In order to test that all the processed images are smaller, I needed to add an image that's bigger than processing.MEDIUM_SIZE, hence bigblue.png.
* Make a function to generate test image filenames.Brett Smith2012-03-201-11/+9
|
* Prefer nose assert_* methods to the assert built-in.Brett Smith2012-03-201-7/+10
|
* Refactor false image tests.Brett Smith2012-03-201-28/+13
|
* Refactor normal upload tests.Brett Smith2012-03-201-27/+17
| | | | | This is nice because it means we do *all* the normal sanity tests for *all* the normal uploads. check_url() can be used in other tests too.
* Refactor MediaEntry fetches/checks into check_media().Brett Smith2012-03-201-14/+13
|
* Refactor data posts into one do_post function.Brett Smith2012-03-201-112/+52
| | | | | | All the data posts in these tests had a lot of common code. Putting all that into a function makes it easier to write more tests (which I'll be doing in a bit) and see what's really being tested.
* small readability improvements in resize_imageBrett Smith2012-03-181-3/+3
|
* Refactor image resize code, with better filenames (#261)Brett Smith2012-03-171-41/+48
| | | | | | | | | | The code to make thumbnail- and medium-sized images in processing.py is pretty similar, so I rolled that out into a separate function that we call with different arguments as appropriate. The new function should work identically to the old code, except it saves images with filenames based on the original filename, like `foobar.medium.jpg` instead of just `medium.jpg`. This fixes bug #261.
* More/better translation.Elrond2012-03-173-3/+6
| | | | | | - Try to preserve some translations (somehow). - Mark "Tagged with" again for translation. - Do not translate the empty string
* Small formatting changes to footer text.Jef van Schendel2012-03-161-5/+1
|
* Create function to search media by slug.Elrond2012-03-164-6/+21
| | | | | | | | | Searching media by slug is easy on mongo. But doing the joins in sqlalchemy is not as nice. So created a function for doing it. Well, and create the same function for mongo, so that it also works.
* Fix for mongo.Elrond2012-03-161-1/+4
| | | | | pymongo does not rewind a cursor after leaving a for loop. So let us do it by hand. Well.
* More efficient first element fetching and Dot-Notation.Elrond2012-03-161-2/+4
| | | | | | | | | | | | | | | _get_tag_name_from_entries: 1) Replace: if q.count(): elem = q[0] by: for element in q: ... break this doesn't do two db queries but only one. 2) And another dose of Dot-Notation as usual.
* Fix _get_tag_name_from_entries().Elrond2012-03-161-1/+1
| | | | Replace == by =.
* Fix uploading of images (sql: media_data, exif).Elrond2012-03-151-4/+7
| | | | | | | When uploading a new image the processing code wants to set the media_data['exif'] part. As exif is not yet in sql, there is no way to make this work now. So the workaround is to check for "no row exists yet" and just ignore exif.
* Fix media display for no media_data row in sql.Elrond2012-03-152-3/+3
| | | | | | | | | | | If there is no media_data row for the current media (for whatever reason, there might be good ones), let MediaEntry.media_data not raise an exception but just return None. The exif display part now handles this by checking whether .media_data.exif is defined (None has no attribute exif, so it's undefined, all fine).
* Implemented the MediaEntry .media_data type fields for SQLChristopher Allan Webber2012-03-141-4/+32
|
* Removing an unnecessary line of whitespace AND crediting Hugo Boyer for the ↵Christopher Allan Webber2012-03-141-1/+0
| | | | | | ipython code! Thanks Hugo Boyer! I forgot to credit you in my last commit.
* Merge branch 'master' of gitorious.org:mediagoblin/mediagoblinChristopher Allan Webber2012-03-145-12/+62
|\
| * Add gps_altitude and gps_direction to image media_data.Elrond2012-03-141-0/+2
| |
| * Convert (gps) image media_data.Elrond2012-03-141-0/+23
| | | | | | | | | | | | Add mongo_to_sql convert part for converting the media_data for images. This currently drops the exif data and thus only converts gps data.
| * Change image processing to create new .gps_*.Elrond2012-03-141-1/+5
| | | | | | | | | | | | The processing should also create .gps_* instead of the old ['gps']['x']. To ease forward porting, use the new media.media_data_init() to set the gps data in the media.
| * Use .gps_* in the template and add translations.Elrond2012-03-141-11/+14
| | | | | | | | | | | | | | Instead of .gps.x use .gps_x and add some "is defined" and stuff. Also mark some strings for translation in here.
| * Migration to move gps data aroundElrond2012-03-141-0/+18
| | | | | | | | | | Move media_data["gps"]["*"] to media_data["gps_*"]. In preparation for media_data.gps_*
* | ipython support in ./bin/gmg shell!Christopher Allan Webber2012-03-141-8/+37
|/
* Merge branch 'elrond-sql-convert_video_data'Christopher Allan Webber2012-03-141-0/+15
|\
| * Fix VideoData insertionChristopher Allan Webber2012-03-141-1/+1
| |
| * Convert media_data for videoElrond2012-03-131-0/+15
| | | | | | | | | | This creates fresh VideoData rows for all the videos in the mongodb.
* | Preserve existing translationChristopher Allan Webber2012-03-141-1/+4
| |
* | Provide a source link so we can comply with the AGPLChristopher Allan Webber2012-03-142-2/+6
|/
* Merge remote-tracking branch ↵Christopher Allan Webber2012-03-139-0/+4224
|\ | | | | | | | | | | | | 'refs/remotes/chemhacker/bug402_nicer_skin_for_video' Conflicts: mediagoblin/templates/mediagoblin/media_displays/video.html
| * adding the video.js wrapperSacha De'Angeli2012-03-129-2/+4225
| |
* | Merge branch 'master' of gitorious.org:mediagoblin/mediagoblinChristopher Allan Webber2012-03-121-2/+6
|\ \
| * | Another .one -> .find_oneElrond2012-03-131-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same idea as in the previous commit. Joar caught this one. To reproduce 1. Create a user with an all-decimal ObjectId in mongo 2. Login using that user, while mongodb is enabled. 3. Switch instance to sql. 4. Restart. 5. Refresh any page. This will error, because no user with that object id exists any more. While around, improved logging.
* | | Merge remote-tracking branch 'derek-moore/bug293_non_ascii_password'Christopher Allan Webber2012-03-121-2/+3
|\ \ \ | |/ / |/| |
| * | Changes for 293. Tests pass, encode UTF8 on password on registration (and ↵Derek Moore2012-03-121-2/+3
| | | | | | | | | | | | also for subsequent logins once the user is created) is working.
* | | Change user search from .one to .fine_one.Elrond2012-03-121-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When searching for a user by username, there can either be no result or one result. There is a unique constraint on the db. .one in mongokit raises an error for more than one result. But that can't happen anyway. So no problem. .one in sqlalchemy raises an error for more than one, but that's not a problem anyway. It also raises an error for no result. But no result is handled by the code anyway, so no need to raise an exception. .find_one doesn't raise an exception for more than one result (no problem anyway) and just returns None for no result. The later is handled by the code.
* | Better media_data sql table for images.Elrond2012-03-121-5/+6
| | | | | | | | | | | | 1. Change to the current primary key = media_entry id layout 2. Add gps_{latitude,longitude} to the table.
* | adds video preload bug 375Sacha De'Angeli2012-03-121-1/+1
|/
* Added m4v to list of media types and a comment stating we shouldChristopher Allan Webber2012-03-121-1/+3
| | | | autogenerate extension list
* Slight change to thumbnail gallery styleJef van Schendel2012-03-111-3/+5
|
* Improve logging of sql queries a bit.Elrond2012-03-101-1/+3
| | | | | | | | | | | | | | | | Docs: http://docs.sqlalchemy.org/en/latest/core/engines.html#configuring-logging So for an application utilizing python logging for real (and MediaGoblin should) the rule is: - Don't use echo=True, - but reconfigure the appropiate loggers' level. So replaced the echo=True by a line to reconfigure the appropiate logger to achieve the same effect. This still dumps whole bloats of SQL queries into the main log, but at least they're not duped any more.
* Forgot to add FileKeynames to MODELSElrond2012-03-081-1/+1
|
* Normalize MediaFile.name (make it a foreignkey)Elrond2012-03-081-3/+32
| | | | | | | | | | The name part of a MediaFile is only using a very limited number of items. Currently things like "original" or "thumb". So instead of storing the string on each entry, just store a short integer referencing the FileKeynames table and have the appropiate string there.
* Changed from key-notation to dot-notation in edit_profileJoar Wandborg2012-03-081-1/+1
|
* SQL: Added MediaFile and MediaAttachmentFile to MODELSJoar Wandborg2012-03-081-1/+2
|
* Generic generate_slug for mongo and sql.Elrond2012-03-072-11/+18
| | | | | | | | | | Using the new check_media_slug_used it is possible to have one generic generate_slug in the mixin class instead of in each db class. In the sql variant self.id is not always set: If the slug alone would create a dupe the current code decides for "no slug at all".
* Push another half-fix for portrait thumbnails. Man, this thing is breaking ↵Jef van Schendel2012-03-071-1/+3
| | | | all over the place.