29 Commits

Author SHA1 Message Date
Sebastian Spaeth
bc142abc55 RIP out mongo
Since sqlalchemy is providing our database abstraction and we have
moved away from Mongo as the underlying database, it is now time to
simplify things and rip out mongo. This provides the bulk of the
changes, and can stand on its own. There are some followup tasks
that can be done, such as removing now unneeded abstraction layers,
e.g. db.sql.fake.py
2012-12-25 20:06:03 +01:00
Will Kahn-Greene
a855e92a98 Fix problems from pyflakes output 2012-06-03 15:53:34 -04:00
Joar Wandborg
c8bee965ad gmg env_import shouldn't crash on unicode ...
characters in media titles
2012-04-02 15:08:22 +02:00
Christopher Allan Webber
cf29e8a824 It's 2012 all up in here 2012-02-02 09:44:13 -06:00
Elrond
228c4470f4 Dot-Notation for MediaEntry.media_files 2012-01-04 11:57:39 +01:00
Joar Wandborg
8eb216388f Fixed import_export
- Mongokit instead of pymongo
- db.MediaEntry instead of db.media_entry (pymongo style)
2011-12-15 23:49:52 +01:00
Elrond
ec82fbd85c Dot-Notation for MediaEntry.title 2011-12-05 21:08:58 +01:00
Joar Wandborg
b9e1fa280e Merge branch 'video_gstreamer-only'
Conflicts:
	mediagoblin/db/migrations.py
	mediagoblin/submit/views.py
2011-11-21 21:51:30 +01:00
Elrond
a9c7af9040 export: Handle Unicode titles better in logging
log("ascii %s" % unicode_string) tries to convert unicode
to ascii, which might fail.

Better use log(u"unicode format %s" % unicode_string) and
let the logging framework handle the conversion. This works
much better and the exceptions still happening aren't
stopping the main app.

Also remove one useless import.
2011-11-15 11:21:15 +01:00
Christopher Allan Webber
ee91c2b88d Merge remote-tracking branch 'remotes/nyergler/pep8-ification'
Conflicts:
	mediagoblin/db/migrations.py
	mediagoblin/db/models.py
	mediagoblin/user_pages/views.py
	mediagoblin/util.py
2011-11-13 20:23:26 -06:00
Elrond
15ac1458ed Make gmg's -cf option a global option
All gmg's subcommands used to have a -cf option to set the
config file. Instead make this a gmg global option.
This means:
  bin/gmg migrate -cf mediagoblin_2.ini
gets
  bin/gmg -cf mediagoblin_2.ini migrate
2011-10-23 21:33:52 +02:00
Elrond
9043e7a012 Refactor gmg's cf option into a function
Many (all?) gmg subcommands take a -cf option to change the
used config file. This options used to be created in each
subcommand's parse_setup. Add a helper function and use it
around.
2011-10-23 12:47:25 +02:00
Joar Wandborg
a7ca2a7211 import_export - Added some error handling
We still want to be able to do an export if a file can't be read
2011-10-14 03:15:50 +02:00
Nathan Yergler
243c3843bd Whitespace and formatting cleanup.
* Removed trailing whitespace
* Line length < 80 where possible
* Honor conventions on number of blank lines
* Honor conventions about spaces around :, =
2011-10-01 15:10:02 -07:00
Joar Wandborg
fd10c71644 Fixed ./bin/gmg. import_export would not find BasicFileStorage, and ./bin/gmg would throw an error no matter what command you tried to run. 2011-09-14 02:08:01 +02:00
Joar Wandborg
33d3de8e2c Refractored gmg_commands.import_export 2011-09-10 10:55:53 -05:00
Will Kahn-Greene
12a100e4d8 508. Updates copyright/license information 2011-09-01 20:50:19 -04:00
Christopher Allan Webber
2db2211d96 We should use os.path.join to concatenate directories. 2011-08-20 22:26:45 -05:00
Christopher Allan Webber
6c6009ba65 Import / export to a temporary directory if cache_path not provided. 2011-08-20 22:22:54 -05:00
Christopher Allan Webber
00e381f794 Apparently we *should* _clean(args), that was commented out for debugging :) 2011-08-20 22:00:21 -05:00
Christopher Allan Webber
cc601bbd58 Removing some print debugging from import_export 2011-08-20 21:59:46 -05:00
Christopher Allan Webber
c02bea6fb9 Use "with closing(tf)" since TarFile doesn't have .__exit__() 2011-08-20 21:36:08 -05:00
Christopher Allan Webber
cd8c65133e Removing unused imports 2011-08-20 16:48:29 -05:00
Joar Wandborg
8f12c9b24c Feature #298 - Create environment tarball
*   Reviewed the code and fixed some bugs
2011-08-12 17:04:34 +02:00
Joar Wandborg
7219983f8e Feature #298 - Create environment tarball
*   It's now possible to import/export your environment from/to a tarball.

    ./bin/gmg env_export [ -c mediagoblin_local.ini ] test.tar
    and
    ./bin/gmg env_import [ -c mediagoblin_local.ini ] test.tar
2011-08-12 02:13:58 +02:00
Joar Wandborg
2a233ae33f Feature 298 - Create environment tarball
Saving changes.
2011-08-09 03:09:42 +02:00
Joar Wandborg
9188f3afe2 Feature #298 - Changed some defaults in gmg_commands.import_export 2011-08-08 03:47:17 +02:00
Joar Wandborg
224813d28c Feature #298
*   Added some minor things to gmg_commands.import_export
2011-08-07 05:00:46 +02:00
Joar Wandborg
e86d4f5d51 Feature #298 - Environment tarball
*    Added command hooks for gmg_commands.import_export
*    Added (DANGEROUSLY BLEEDING EDGE) gmg_commands.import_export
2011-08-07 02:58:52 +02:00