Christopher Allan Webber
956335c839
Removing an unnecessary line of whitespace AND crediting Hugo Boyer for the ipython code!
...
Thanks Hugo Boyer! I forgot to credit you in my last commit.
2012-03-14 16:03:09 -05:00
Christopher Allan Webber
0e93443f59
ipython support in ./bin/gmg shell!
2012-03-14 16:00:34 -05:00
Elrond
9891351256
Create "gmg convert_mongo_to_sql" command
...
Finally, to make testing of sql a bit easier, create a
bin/gmg command to do the conversion from mongo to sql.
It's currently named "convert_mongo_to_sql".
The most important option is the gmg -cf option to give a
configfile with the appropiate sql_engine definition.
2012-02-23 23:49:09 +01:00
Christopher Allan Webber
3ea1cf36fc
Updates so that dbupdate command works
...
- Various fixes to dbupdate itself
- Switching db/sql/migrations.py to use a dict instead of a list
- Registering the function
2012-02-18 23:19:09 -06:00
Christopher Allan Webber
63352aaf70
Merge branch 'master' into sqlmigrate
...
Conflicts:
mediagoblin/db/sql/models.py
2012-02-18 10:01:47 -06:00
Christopher Allan Webber
cf29e8a824
It's 2012 all up in here
2012-02-02 09:44:13 -06:00
Christopher Allan Webber
3f2c6f96c1
No need for self here (thanks again Elrond ;))
2012-01-29 16:33:45 -06:00
Christopher Allan Webber
70b44584ae
Big ol' start of the SQL migrations system.
...
Things definitely don't work yet, but should be heading in the right direction.
2012-01-29 16:33:44 -06:00
Elrond
228c4470f4
Dot-Notation for MediaEntry.media_files
2012-01-04 11:57:39 +01:00
Elrond
690672580e
Fix "bin/gmg migrate" after mongo move
...
When moving most stuff from db to db/mongo, "gmg migrate"
was left out.
Fix it now!
2011-12-28 23:46:36 +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
Elrond
bec591d85b
Dot-Notation for Users.is_admin
2011-12-05 21:08:57 +01:00
Elrond
7a3d00ec21
Dot-Notation for Users.status
2011-12-05 21:08:57 +01:00
Elrond
4facc7a0a2
Dot-Notation for Users.email_verified
2011-12-05 21:08:57 +01:00
Elrond
9047b254f3
Dot-Notation for Users.pw_hash
2011-12-05 21:08:57 +01:00
Elrond
809cbfc5ab
Dot-Notation for Users.email
2011-12-05 21:08:57 +01:00
Elrond
5a4e3ff1e2
Dot-Notation for Users.username
2011-12-05 21:08:57 +01:00
Christopher Allan Webber
bb20c179c4
Most users won't see this but having space after prompt still nice for passwords.
2011-12-03 21:59:52 -06:00
Christopher Allan Webber
bbac7663f4
PEP-8'ifying prompt_if_not_set
2011-12-03 21:56:30 -06:00
Manuel Urbano Santos
7d98005a6b
Prompt for arguments in adduser if not present (I created a function in util.py to check and prompt for arguments).
2011-12-03 15:36:02 +01:00
Manuel Urbano Santos
d463055317
Change adduser arguments from positional to --keyword style.
2011-12-03 14:29:28 +01:00
Elrond
5568a01419
Use setup_global_and_app_config in gmg's migrate.
...
Instead of using read_mediagoblin_config, forgetting to
check the validation report and then finding the main app
section by hand, just use setup_global_and_app_config.
2011-11-26 11:50:25 +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
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