2114 Commits

Author SHA1 Message Date
Elrond
582958e333 The video media_type needs pygtk/gtk.
Note in the docs, that the video media_type needs the gtk
and pygtk modules and where to get them on debian.
2012-03-29 13:15:38 +02:00
Elrond
02f07bfe14 411: Add relationship and backrefs to media_data tables.
Adding proper relationship()s and especially backref()s
will delete media_data rows along with the main MediaEntry.
This fixes #411.
2012-03-28 13:21:47 +02:00
Joar Wandborg
352a180765 Changed audio.* Image* imports
so that they no longer import from PIL explicitly.
This is due to explicit PIL.Image* imports failing
on a Ubuntu machine within virtualenv.

PIL is a mystery I have yet to find the energy to unravel.

The 'implicit' approach works both for the affected
machine and my local machine and I've seen it more often
out in the wild, so I'm assuming it is the right way.
2012-03-27 23:43:15 +02:00
Joar Wandborg
0308958b2d Fixed test_submission -> test_evil_file test 2012-03-27 16:38:41 +02:00
Joar Wandborg
deea3f6661 Merge remote-tracking branch 'joar/audio+sniffing'
Conflicts:
	mediagoblin/media_types/image/processing.py
	mediagoblin/media_types/video/__init__.py
	mediagoblin/media_types/video/processing.py
	mediagoblin/tests/test_submission.py
2012-03-27 12:05:09 +02:00
Christopher Allan Webber
d0cb752992 Removing superfluous whitespace 2012-03-26 15:11:05 -05:00
Christopher Allan Webber
c051615889 Merge remote-tracking branch 'remotes/slikdigit/bassam'
Conflicts:
	mediagoblin/media_types/image/processing.py
2012-03-26 15:09:35 -05:00
Christopher Allan Webber
e3e5980624 Merge remote-tracking branch 'remotes/bretts/bug261-resized-filenames' 2012-03-26 14:33:12 -05:00
Elrond
f4162cb640 Reload the user for current values.
This might not be needed, but it helped at one point.
2012-03-26 20:31:36 +02:00
Elrond
37ef4c66b1 Reload and detach the test user.
The code often needs to know some fields of the test user
even after doing some sql and stuff. The solultion is to
reload it and properly detach it from its Session. That way
all its fields are available and the whole thing is not
connected to a session. It feels like a normal object.
2012-03-26 20:31:35 +02:00
Jef van Schendel
ebb24e4fd1 Add comment in JavaScript file about duplicating the password field 2012-03-26 20:23:49 +02:00
Brett Smith
c16b819663 Merge remote branch 'origin/master' into bug261-resized-filenames
This merge involved moving the new FilenameBuilder class to
processing/__init__.py, and putting the comment deletion tests back into
test_submission.py using the refactored functions.
2012-03-26 14:10:22 -04:00
Brett Smith
28f364bd6d Rename to FilenameBuilder, with a main method named fill.
I think these names better convey what's actually going on.  I updated the
documentation a bit while I was at it.
2012-03-26 13:40:35 -04:00
Christopher Allan Webber
38877794e7 TestSubission's tag check stuff passing now 2012-03-26 11:59:34 -05:00
Christopher Allan Webber
8ea37380bd Remove the user_dev directory on tests ending
(We used to remove the mongo db on tests ending...)
2012-03-26 11:50:36 -05:00
Christopher Allan Webber
8e96bcbc78 Suggest we move to an in-memory database ;) 2012-03-26 11:31:09 -05:00
Christopher Allan Webber
d693f6bd86 SQL based tests and refactored Celery setup stuff
- Changed config files of test configs to use SQL
 - Updated celery initialization tools, factored them to be able to
   use the "big instance" application stuff
2012-03-26 11:14:11 -05:00
Joar Wandborg
c56d4b55a1 Media type refractors, pep8, lint
- Removed THUMB_SIZE, MEDIUM_SIZE constants, depend on
  configuration values instead.
- pep8 refractoring
2012-03-26 17:44:08 +02:00
Derek Moore
fa72e51689 Updates to send email comments, included translation, better validation. 2012-03-25 22:25:54 -07:00
Jef van Schendel
7ccf418185 Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin 2012-03-25 21:34:00 +02:00
Elrond
0608d57f5d Merge remote-tracking branch 'gandaro/forgot-password-autofillin'
* gandaro/forgot-password-autofillin:
  set username default server-side
  Fill username automatically in (Forget Password)
2012-03-25 21:34:05 +02:00
Jakob Kramer
952b97d5a0 set username default server-side 2012-03-25 21:51:09 +02:00
Jef van Schendel
afcb08553e Header style change 2012-03-25 21:33:52 +02:00
Brett Smith
84725abd64 Refactor video processing to use FilenameMunger. 2012-03-25 13:32:25 -04:00
Brett Smith
ab35ad4605 Use FilenameMunger. 2012-03-25 13:26:57 -04:00
Brett Smith
4774cfa3c0 Add documentation to the FilenameMunger class. 2012-03-25 12:16:19 -04:00
Brett Smith
095fbdaf8d Add FilenameMunger class to processing, with tests.
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.
2012-03-25 12:11:13 -04:00
Elrond
5101f84404 Drop debug from migration. 2012-03-25 15:01:24 +02:00
Elrond
e63656fcf7 Cleanup mongo->sql converter.
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).
2012-03-25 14:42:03 +02:00
Elrond
f7ab2f42ea Do not fill media_data['exif'] any more. 2012-03-25 14:42:03 +02:00
Elrond
11d36843b0 Migration fixup: Drop empty exif_all.
If the exif info is totally empty, do not add it at all to
the media_data dict in mongo.
2012-03-25 14:42:03 +02:00
Elrond
c8c75ad044 Create migration to move exif data around in media_data.
Move media_data['exif']['clean'] to media_data['exif_all']
drop media_data['exif']['useful']
drop media_data['exif']
2012-03-25 14:42:03 +02:00
Elrond
f116a1243f Use exif_display_iter in the template.
As the newly created entries have media_data.exif_all use
the exif_display_iter method to calculate the exif entries
for displaying on the fly.

After the mongo migration all the old entries will also
have exif_all and will work again.
2012-03-25 14:42:03 +02:00
Elrond
763ef5b77e Start to fill media_data.exif_all in addition.
In addition to filling the normal slot media_data['exif'],
now also fill media_data.exif_all. This is the new slot
used by SQL.
For a few moments this will create duplicated entries in
the mongo db. But this shouldn't hurt.
2012-03-25 14:12:53 +02:00
Jakob Kramer
6c49799deb Fill username automatically in (Forget Password)
Fill the username automatically in the "Forget Password" form
if the user already entered his username on the login page
2012-03-24 17:39:52 +01:00
Christopher Allan Webber
db4039165f Merge remote-tracking branch 'remotes/gandaro/wipealldata-from-db_name' 2012-03-24 09:58:26 -05:00
Jakob Kramer
9edd71ebf7 Wipe the configured database, not the default one 2012-03-24 15:33:36 +01:00
Jakob Kramer
e8be1d7af5 Allow arrow keys in input fields and textareas
If you pressed an arrow key in a textarea before, the next/previous media
was opened.
2012-03-24 14:49:43 +01:00
Jakob Kramer
32d8cf4511 remove unused `mg.submit.security' module 2012-03-23 22:13:48 +01:00
Elrond
7b82f56bae Fix cyclic import issue.
Oh well:

tools.exif -> processing -> db.util -> db.models -> db.mixin -> tools.exif

So import tools.exif locally in exif_display_iter()
2012-03-23 20:28:11 +01:00
Elrond
5bad26bc47 Create MediaEntry.exif_display_iter()
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.
2012-03-23 20:20:54 +01:00
Elrond
e0b0588fb1 image_mediadata: Add exif_all column 2012-03-23 19:22:28 +01:00
Elrond
e0e7232af9 Add copyright header to image/models.py 2012-03-23 19:22:28 +01:00
Jakob Kramer
fbf56c1a5d correct wrong version number
(`-dev' instead of `.dev')
2012-03-23 18:15:46 +01:00
Elrond
99c2f9f0c4 New media_data row needs to know its MediaEntry's id.
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?
2012-03-22 21:21:38 +01:00
Joar Wandborg
a9d84d4cb7 Faster sniffing
- Sniffing now goes through the old extension-based filter before
  doing it the bitsniffing way.
- Refractored get_media_type_and_manager(filename).
- Removed ogg extension from video accepted extensions, audio
  will take care of that.
- Added custom audio player, still WIP,but working.
- Added test for sniffing. This only tests for the
  mediagoblin.media_types.image type, as that is the only
  one enabled from start.
2012-03-22 01:27:19 +01:00
Elrond
ecd538bb65 Add index=True for some columns.
These are the columns that seem to make the most sense to
have an index on them.
2012-03-21 22:46:38 +01:00
Elrond
e136ad3ed6 Finally load all models.
Load all models for the media_types. This was stopped by a
celery problem. But that is now fixed.
2012-03-21 21:48:09 +01:00
Elrond
32adc9b2a7 Panel: Find "unprocessed" not "processing" entries.
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.
2012-03-21 12:17:57 +01:00
Elrond
4114e54df5 And fix the in-celeryd import.
So that celeryd also loads the task.
2012-03-21 12:17:52 +01:00