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
Christopher Allan Webber
9d0a613be9
Default to mediagoblin_local.ini if available in ./bin/gmg commands
2011-10-29 16:24:52 -05:00
Christopher Allan Webber
c57b42a130
Removed suggestion that the user run ./bin/buildout
2011-10-26 11:24:39 -05:00
Christopher Allan Webber
4a4035c8af
Added an extra warning about wipealldata being pretty inflexible.
2011-10-26 11:21:25 -05: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
Christopher Allan Webber
b43b17fc26
Merge remote branch 'remotes/aaronw/bug444_fix_utils_py_redux'
...
Conflicts:
mediagoblin/util.py
2011-10-01 21:27:36 -05:00
Nathan Yergler
285ffeddf3
has_key is deprecated, converting uses to use "in" operator.
2011-10-01 15:10:41 -07: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
Will Kahn-Greene
fc3dc25541
Adds license header
2011-07-30 08:39:07 -04:00
Will Kahn-Greene
763cf83f64
Moves destroy_environment to wipealldata command
2011-07-30 08:39:07 -04:00
Christopher Allan Webber
90e342f90f
app.py and migrate.py must import migrations in order to load said migrations...
2011-07-14 00:32:01 -05:00
Christopher Allan Webber
ecf518020f
Elrond thinks we should use one of print/sys.stdout.write and .flush()
...
I don't see the harm, so... done.
2011-07-13 21:14:31 -05:00
Christopher Allan Webber
ba04c88730
Use new migrations system in ./bin/gmg migrate
2011-07-10 22:44:33 -05:00
Christopher Allan Webber
8db03585a2
Updating migrate.py to actually run the indexing commands
2011-06-27 20:05:01 -05:00
Christopher Allan Webber
64201d12c3
Slightly clearer message about email marked as verified w/ adduser gmg command
2011-06-22 22:17:58 -05:00
Christopher Allan Webber
a3fae1bd07
Setting status to active when adding users with ./bin/gmg adduser
2011-06-22 22:16:50 -05:00
Christopher Allan Webber
8781ddb541
Making arguments positional and removing the "usage" functions
...
All these arguments were required and might as well be positional
thusly. If you don't provide all required positional arguments,
argparser will correct you and request usage.
2011-06-22 22:16:37 -05:00
Christopher Allan Webber
7f4b44710b
No need to describe usage of subcommands, gmg subcommand --help does that
2011-06-22 22:09:11 -05:00
Alejandro Villanueva
96108ea285
Adding new function to gmg_commands, adduser,makeadmin and changepw issue 373
2011-06-22 21:49:06 -05:00
Christopher Allan Webber
72c3ae046a
./bin/gmg commands upgraded to work with the new setup.
2011-06-18 20:14:51 -05:00
Christopher Allan Webber
6e7ce8d1af
mediagoblin.globals->mediagoblin.mg_globals
2011-06-12 17:27:37 -05:00
Christopher Allan Webber
757f37a52d
User migration works (but the rest of the system isn't updated for new user setup yet)
2011-05-22 10:52:53 -05:00
Christopher Allan Webber
8820121ad1
Move the general applicaiton setup commands to a utility module
2011-05-22 09:56:33 -05:00
Christopher Allan Webber
dbb92c6020
Move the ./bin/gmg shell command into its own module.
2011-05-22 09:25:51 -05:00
Christopher Allan Webber
029cad45c6
./bin/gmg shell! Should make a lot of peoples' hacking lives easier I suspect :)
2011-05-15 19:02:11 -05:00