1918 Commits

Author SHA1 Message Date
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
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
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
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
Elrond
eace050a7d Move celery task into own task.py
Move the actual celery task from processing/__init__.py
into its own .../task.py. That way it can be imported as
needed.
2012-03-21 12:12:07 +01:00
Elrond
4bdee988b6 Turn processing.py into a submodule.
processing.py -> processing/__init__.py

This is in preparation for splitting processing a bit.
The main reason for the split is celery setup: celery needs
to be setup before even importing and importing and
subclassing some of its parts. So it's better to move the
critical parts into their own submodule and import it as
late as needed.
2012-03-21 12:11:58 +01:00
Christopher Allan Webber
8839540656 Merge remote-tracking branch 'refs/remotes/brett/bug270-lazycelery-script' 2012-03-20 23:24:43 -05:00
Elrond
8fd81053b4 More standard media_data model for ascii.
ascii doesn't use media_data at all. So it needs the most
basic media_data model. Fix it to take the current form.
2012-03-20 23:55:28 +01:00
Elrond
b829595334 Create load_models().
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.
2012-03-20 12:45:40 +01:00
Elrond
39fd817ab8 Import "Base" from base instead of models.
Import the "Base" class for models from db.sql.base instead
of db.sql.models.
2012-03-20 12:45:40 +01:00
Elrond
df7c405845 Disable query logging for now, so we get nicer logs
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.
2012-03-20 12:45:40 +01:00
Jakob Kramer
6b45ec1b0c 500 error because of subscripting instead of using attributes 2012-03-18 22:28:22 +01:00
Christopher Allan Webber
5f08116352 Committing extracted and compiled translations 2012-03-18 15:16:37 -05:00
Christopher Allan Webber
50fd85967f Committing present MediaGoblin translations before pushing extracted messages 2012-03-18 15:16:03 -05:00
Christopher Allan Webber
9dcd8436a9 Fixing manual tyop: MediaGoblin, not MediaGobiin (thanks gandaro!) 2012-03-18 14:39:35 -05:00
Christopher Allan Webber
54477b4d76 Removing print statements from convert_gps_media_data migration
Kind of useful to see but... I don't think they're needed, and I'm not
super comfortable with print statements being in migrations.  Seems
semi bloated!
2012-03-18 12:07:41 -05:00
Brett Smith
e4df2fc5b3 Refactor lazyserver.sh to lazystarter.sh and provide lazycelery.sh (#270)
Bug #270 asks for a lazycelery.sh script much like lazyserver.sh.  Rather
than duplicate the code, I consolidated them into a single script,
lazystarter.sh.  The script reconfigures itself a bit, and runs a
particular server, based on the name that's used to call it, but no matter
what it uses the same code to offer help and find configuration files and
server launchers.  Hopefully this will make it easy to add other
features/fix bugs as needed in the future, and have them stay in sync.
2012-03-17 22:33:08 -04:00
Elrond
7bf819a995 Let convert_mongo_to_sql add Migration Records
The mongosql tool is really dumping directly into the sql
database and is trying not to use too much logic that might
change later.

So this means, it needs to create the migration records on
its own!
So add a bunch of records with version=0.
2012-03-17 23:45:29 +01:00
Christopher Allan Webber
16fca040d5 Merge remote-tracking branch 'brett/bug264-delete-comments-with-media' 2012-03-17 17:18:15 -05:00
Christopher Allan Webber
2011f2d89e Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin 2012-03-17 17:09:26 -05:00
Christopher Allan Webber
9e55431143 mongo->sql conversion script now runs mongo migrations first, just in case 2012-03-17 17:08:46 -05:00
Jef van Schendel
327a1bb279 Remove sidedata class from html pages 2012-03-17 22:58:33 +01:00
Christopher Allan Webber
4a250dbdde Also ignore the /share/ directory 2012-03-17 16:57:18 -05:00
Jef van Schendel
4c417c59b3 Small styling change for sidebar data 2012-03-17 22:56:25 +01:00
Christopher Allan Webber
2f5ce68c6c Make mediagoblin SQL models all use a consistent table naming scheme 2012-03-17 16:56:23 -05:00
Brett Smith
a0a7f87f62 When media is deleted, delete associated comments too.
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.
2012-03-17 17:53:00 -04:00
Christopher Allan Webber
431811eb36 Mongosql imports made celery get set up before we wanted it via ./bin/gmg commands
Just moved the import into the actual function.  That resolved the issue!
2012-03-17 12:31:11 -05:00