4756 Commits

Author SHA1 Message Date
Christopher Allan Webber
c122a9d24e Update out script.py mako template to support branch_labels
This is important (probably) for long-running plugin branches.

* mediagoblin/db/migrations/script.py.mako: Updated to upstream
  Alembic version of this file.
2016-03-26 11:39:07 -07:00
Christopher Allan Webber
05879c1c76 dbupdate updates to use plugin migrations if available
This makes use of the recently added "build_alembic_config" tool and
removes AlembicMigrationManager.

* mediagoblin/db/migration_tools.py (AlembicMigrationManager): Removed.
* mediagoblin/gmg_commands/dbupdate.py (run_alembic_migrations):
  Adjusted to use recently added build_alembic_config tool.
2016-03-26 11:39:07 -07:00
Christopher Allan Webber
731df78225 Ignore .eggs/ directory 2016-03-26 11:39:07 -07:00
Christopher Allan Webber
6e9041aa4b Add build_alembic_config, use it to add plugin migrations to alembic config 2016-03-26 11:39:07 -07:00
Christopher Allan Webber
3f08f780f6 guix-env.scm: Comment on python-numpy pulling in texlive
textlive-texmf is currently a dependency of texlive in Guix, and is
very large.  Users may want to know and disable this dependency, if
they can bear limiting the media types they are developing with.

* guix-env.scm: New comment on returned package.
2016-03-24 14:23:49 -07:00
Christopher Allan Webber
0ce775ac2a Remove requirement that audio/video dependencies must be installed for tests
Some tests were added for running audio and video submission tests in
test_submission.py.  Unfortunately these were not skipped if these
dependencies were not installed.  This patch attempts to fix that while
leaving the tests intact.
2016-03-18 12:32:22 -07:00
Boris Bobrov
339cfb3894 Merge branch 'master' of git.sv.gnu.org:/srv/git/mediagoblin 2016-03-12 00:34:15 +03:00
Christopher Allan Webber
f0346c7aad Add python-gst to guix-env.scm 2016-03-09 12:05:31 -08:00
Boris Bobrov
86dc32bc20 Check all tags for existence before using them
Fix bug 5401
2016-03-09 12:28:14 +03:00
Boris Bobrov
17aaab6907 Fix module name for gmg alembic command
gmg_commands.alembic attempted to import from `alembic`. On python2.7
it resulted in import from itself.

Rename alembic.py to alembic_commands.py and fix references to
gmg_commands.alembic.
2016-03-08 18:23:45 +03:00
Boris Bobrov
fec916dfbe Check tags for existence before using them
Closes bug 5401
2016-03-08 17:37:04 +03:00
Andrew Browning
ee7db0a3d1 Fix #5440 - Typo in blog views 2016-03-06 19:47:17 -05:00
Christopher Allan Webber
4efa61c16a Commentary on where this hack on detecting no subcommand to Alembic comes from 2016-03-05 16:28:41 -08:00
Andrew Browning
512ed083b7 Fix comment ID links on blog media page
Change the comment ID behaviour and source of
user_pages/blog_media.html to match user_pages/media.html as of #5376.
2016-03-05 11:58:23 -05:00
Andrew Browning
b1d4973ca4 Fix comment ID links on media comment report page
Change the comment ID behaviour and source of user_pages/report.html
to match user_pages/media.html as of #5376.
2016-03-05 11:39:57 -05:00
Christopher Allan Webber
399272eea5 Add "gmg raw_alembic" command.
This allows you to dispatch to the "alembic" command line tool properly,
but properly respecting MediaGoblin's own configuration.
2016-03-03 09:31:00 -08:00
Christopher Allan Webber
a48736fc09 typo fix: Set sqlalchemy.url, not qlalchemy.url 2016-03-02 16:08:12 -08:00
Christopher Allan Webber
af6b89eafe Remove old hack to support pre-0.7.5 Alembic versions
Thanks to Jessica Tallon for pointing out this TODO and its associated
hack could be removed.
2016-03-02 11:20:47 -08:00
Christopher Allan Webber
0c9c5cab62 Remove version caps on sqlalchemy and alembic.
Code seems to pass fine after the cap is removed.  Whatever dependency
issues we were running into before don't seem to be an issue now.
2016-03-02 11:20:47 -08:00
Andrew Browning
690597ef83 Fix #5432 - Comment report link doens't work
This builds on work done for #5376 and associates the correct comment
ID with comment report links.
2016-03-02 12:45:07 -05:00
Andrew Browning
289826dc46 Fix #5435 - Bad comment links cause server error
This patch addresses an issue where a server error is caused by
entering a non-existent comment ID in a media URL.
2016-03-02 12:31:55 -05:00
Jessica Tallon
161bc6b2c1 Fix #5376 - Ensure links have correct ID
This ensures that links to comments have the correct ID (the
ID of the Comment object) as well as fixing deletion on reports
and fixing a few other little things. I hope this fixes the #5376
issue, though cannot reproduce so unable to confirm.
2016-03-01 12:04:08 +00:00
Andrew Browning
1db8690fe9 Fix #5433 - Typo in decorators 2016-03-01 01:00:14 -05:00
Andrew Browning
d508435985 Fix #5431 - Typo in models
Fix a typo in models.py.
2016-03-01 00:28:42 -05:00
Jessica Tallon
7555d1084f Fixes #5421 - Ensures Report.object_id is nullable
It seems there was a commit for a while where the migration was
making Report.object_id NOT NULL and this caused an errror when
a report deleted the associated object (media). This migrtion
checks it's nullable and if not, alters it so it is.
2016-02-29 19:18:42 +00:00
Jessica Tallon
ab14059538 Migration for #5415 - I forgot it, Doh! 2016-02-29 19:04:44 +00:00
Jessica Tallon
4c3a621b6d Fix a typo in consolidate_reports migration 2016-02-29 18:17:42 +00:00
Jessica Tallon
2104c3e0f2 Fix #5415 - Deleted comments get removed properly when tombstones
The original wrapper existed and should be been removed, this fix
now ensures the TextComment removes the Comment wrapper to prevent
the deleted (comments which are tombstones) existing.
2016-02-29 15:40:34 +00:00
Jessica Tallon
7fa67404ee Simply for the Notification.object_id migration 2016-02-29 15:34:14 +00:00
Jessica Tallon
f20e508dbc Missing perens 2016-02-29 14:26:05 +00:00
Jessica Tallon
677bf0ef62 Fixed issue introduced in previous migration 2016-02-29 14:14:58 +00:00
Jessica Tallon
6efcab2d69 Change Notification.object_id to be ID of Comemnt not TextComment
This shouldn't really effect much but it is a needed change for the future
this changes the Notification.object_id to be the ID of the Comment (the link
table to the comment object) rather than TextComment (the comment object itself).

This is needed as now comments can be other things, other than TextComment.
2016-02-29 12:33:51 +00:00
Christopher Allan Webber
6d38b1858c No need for python-chardet in guix-env.scm
That was *already* upstream in guix!
2016-02-25 15:41:03 -08:00
Christopher Allan Webber
7e550fcb9d Email debug mode on Python 3 was printing bytestring representation for subject body
There's nothing useful about seeing b'foo\nbar\nbaz' printing to
stdout.  That's not what the user should get!
2016-02-25 15:38:28 -08:00
Christopher Allan Webber
3d78038a3c guix-env.scm: Remove python-paste and python-pastescript, add python-chardet
python-paste and python-pastescript are now part of Guix proper.
Working on getting python-chardet there as well.
2016-02-25 11:14:33 -08:00
Christopher Allan Webber
8b76211d74 Crediting iyzsong 2016-02-24 18:05:03 -08:00
Christopher Allan Webber
020ddf92ca Fix sturm (Ben Sturmfels)' attribution 2016-02-24 18:04:09 -08:00
Christopher Allan Webber
eb564614cb Fix ascii media type for Python 3. Fix by 宋文武 (iyzsong) 2016-02-24 17:54:34 -08:00
Christopher Allan Webber
410ab9cacd Oops, I forgot to include test_mgoblin_app_pdf.ini 2016-02-24 17:52:15 -08:00
Christopher Allan Webber
118ca330df Also switch "#!/usr/bin/env bash" to "#!/bin/sh" in compile-translations.sh 2016-02-24 13:45:03 -08:00
Christopher Allan Webber
d0a0947986 Add guix-env.scm to launch a Guix environment for hacking.
(Thanks to David Thompson for help on the MediaGoblin packaging, which
went into this a lot!)
2016-02-24 13:45:03 -08:00
Boris Bobrov
993e061873 Change viewitems to items
There is no viewitems in python3
2016-02-23 04:15:06 +03:00
Boris Bobrov
5eaf6c1120 do not show error message when it's not a exception
Gah, the previous patch was not enough! We cannot use text, we can only
use exception with a special attribute.

Lets return safe None for now an resolve this properly later, when we're
not in the freeze.
2016-02-23 04:03:27 +03:00
Boris Bobrov
7dcdc2dcc6 Catch import error when text is used as a reason instead of path
fail_error was used in import, but due to some changes text could appear
there and it caused an error.

There is little sense now to remove these text messages because they are
probably in databases already, so just ignore import errors.
2016-02-23 03:57:00 +03:00
Andrew Browning
1fe6f5d6d7 Fix issue #5411 sqlite connection closes
This update changes migrations to wrap db.execute results in a list to
keep the connection from closing for sqlite migrations.
2016-02-23 03:32:34 +03:00
Andrew Browning
5aa4ab0615 Fix issue 5422 Resend verification fails
If a user was logged in and already verified, the resend_verification
link would cause a server error. This fix addresses that by using the
correct syntax to query the username from the request.
2016-02-22 14:43:38 -08:00
Christopher Allan Webber
062e37899d Oh, we don't need Paste, but we do need PasteScript! 2016-02-20 13:25:45 -08:00
Christopher Allan Webber
e2212f944b Basic explaination of how to deploy with Python 3.
Could be better, but "works" for now.
2016-02-20 12:47:59 -08:00
Christopher Allan Webber
c9cdb03657 Move Ubuntu -> *buntu because of absurd trademark issues
For more context, see:
  http://joeyh.name/blog/entry/trademark_nonsense/
2016-02-19 11:51:20 -08:00
Christopher Allan Webber
5c58b69e51 Removing python 2.6 junk: argparse and a 2.6 classifier 2016-02-19 10:22:48 -08:00