4914 Commits

Author SHA1 Message Date
Jessica Tallon
83d9b6c3f6 Use inspect_table inplace of redefining them all
Just like we would have in sqlalchemy-migration inspect_table works and
is better than constantly redefining a table in the migration. This switches
the migration to use that method.
2016-01-18 10:29:01 +00:00
Jessica Tallon
2ddebb97bf Fix #5391 - Alembic migrations would only work for SQLite
The database connection was being set in a alembic.ini config file, if the user
had specified postgres the "sqlite" connection URL in alembic.ini would override
that. We probably should look into this more so i've opened #5395.
2016-01-18 09:39:34 +00:00
ayleph
beb5a4a150 Fix issue 5366 Update blog views
This commit updates blog views to be compatible with recent database
migrations.

Signed-off-by: Jessica Tallon <tsyesika@tsyesika.se>
2016-01-15 10:15:41 +00:00
Jessica Tallon
eebd0063fe Fix #5382 - Add migration and fix so tombstones are removed from collections
When an item is deleted it should be removed from all collections, this commit
makes that happen. It's got two changes:

1. Adds the code so when an object is soft deleted, it's automatically removed from
   all collection items
2. Add a migration to fix this issue for those who have tombstones (Graveyard objects)
   in their collections because of this bug.

This commit requires you to run a migration
2016-01-15 09:20:15 +00:00
Loic Dachary
c17f755eea Fix #5315 - use env in shebangs 2016-01-14 10:25:23 -08:00
宋文武
90c083aafe Use six.itervalues() in delete_media_files 2016-01-14 10:21:04 -08:00
Christopher Allan Webber
673bee80ff Adding Tom Fay to the AUTHORS file 2016-01-14 10:16:12 -08:00
Christopher Allan Webber
f485d55f81 Add a TODO to rename run_all_migrations to run_legacy_migrations 2016-01-11 07:14:33 -08:00
Boris Bobrov
a6835f422f Initial alembic migration to base other migrations on
Use this migration as a parent for yours.
2016-01-11 07:14:33 -08:00
Boris Bobrov
2b68834c44 Enable alembic as the main tool for migrations
Enable alembic for all migrations and limit the max number of
sqlalchemy-migration migration. All new migrations must now be in
Alembic!
2016-01-11 07:14:33 -08:00
Boris Bobrov
8da8c0ac2d Fix various style issues
Sorry, cannot look at them without urge to fix
2016-01-11 07:14:33 -08:00
Christopher Allan Webber
9bc8c8709d Add a comment when we do / don't add collections dropdown
Otherwise that "del submit_form.collection" might be confusing :)
2016-01-07 11:07:38 -08:00
tom
43cf0a68f2 Add test to check that an activity is created when a collection was chosen. 2016-01-07 11:04:13 -08:00
tom
5f60a4550d Add collection drop down to submit page. 2016-01-07 11:04:11 -08:00
Boris Bobrov
cf948352b2 Do not require python3.3 explicitely
It's easier to say "use python3.3+" rather than prevent usage of earlier
versions programmatically in autoconf.
2016-01-07 10:50:32 -08:00
Boris Bobrov
6db9c5258c Uncap Paste
Paste was capped to 1.9.9 because 2.0 broke us. Now Paste 2.0.x was released
and it doesn't break us any more. Closes bug 5317.
2016-01-07 21:12:01 +03:00
Boris Bobrov
ab53aea8f4 Add workaround for incompilable Interlingua locale
For now we cannot compile Interlingua (ia) locale; please see issue
1070 for details.
2016-01-07 19:50:27 +03:00
ayleph
e75a45c00f Fix issue 5367 Edit view updates
This commit fixes issue 5367 by updating the edit view to be compatible
with recent db migrations.

Signed-off-by: Jessica Tallon <tsyesika@tsyesika.se>
2016-01-06 16:11:52 +00:00
ayleph
47f7ff8d22 Fix issue 5371 broken collection atom feeds
Signed-off-by: Jessica Tallon <tsyesika@tsyesika.se>
2016-01-06 16:04:42 +00:00
Jessica Tallon
9bdb174143 Fix #5369 - Broken activities cause issues in migrations
This fixes a few bugs in previous migrations and then also introduces a new
migration for those who had run the previous migrations without encountering
the bugs to ensure that the database is in the same state as those who ran it
after the bug fixes introduced in this commit.

The commit also ensures that all activities are valid, they should be but they
might not be so checks, from now on we should be able to assume that all activities
will always be valid.
2016-01-06 15:58:33 +00:00
Christopher Allan Webber
94c064d3ad Point to the "Libre Browsers Libre Formats" page on the LibrePlanet wiki 2015-12-29 15:03:36 -06:00
Jessica Tallon
40add1afe2 Remove .tx/config as we're no longer using Transifex 2015-12-29 16:42:37 +00:00
Jessica Tallon
0ae15357eb Fix a exception db closed exception in migrations
Some sqlite migrations were failing due to some problems with sqlite. A
work around has been created for these however it does involve loading lots
of data into memory. If you have a large database you should consider trying
to move to postgres.
2015-12-29 16:42:37 +00:00
Jessica Tallon
bf79b8bd5b Fix migrations of activity intermediators
There was a problem where it was assuming the tablenames are the same
in master as they always were and that isn't the case. This would cause
it to raise an exception when trying to look up a table which didn't exist.
This fixes that by hardcoding the old tablenames in for this migration.
2015-12-29 16:42:37 +00:00
Jessica Tallon
ccd9dabe75 Fix #5368 - Improve test efficiancy
There were a number of tests where lots of models where being iterated through
and then at the end committing them. The problem is all the changes had to be
kept in memory or on disk somewhere before they were commit to the database. This
fix commits each change as it's being made, allowing resources to be freed and fixing
some of the inefficiencies
2015-12-29 16:42:37 +00:00
Boris Bobrov
63053f8c66 Merge branch 'stable' 2015-12-21 02:46:24 +03:00
Boris Bobrov
355d062dd4 Work around pbutils import warning bug (5066) 2015-12-21 02:45:22 +03:00
Boris Bobrov
f58fac0950 Fix typo in VideoData docstring 2015-12-20 21:38:56 +03:00
Christopher Allan Webber
a308306bcb Setting 0.8.2.dev in configure.ac as well 2015-12-20 11:11:07 -06:00
Christopher Allan Webber
7f5a8e1c38 Setting version to v0.8.2.dev 2015-12-20 11:10:30 -06:00
Christopher Allan Webber
ca3dd10e2b Fixing typo (thanks breton) 2015-12-20 10:58:43 -06:00
Christopher Allan Webber
9b9c04e6ac 0.8.1 release notes 2015-12-20 09:53:25 -06:00
Christopher Allan Webber
76a8e720e5 Merge branch 'stable' 2015-12-20 09:05:00 -06:00
Jessica Tallon
86ee2d1a0e Fix security issue in OAuth verifier validation 2015-12-19 22:16:00 -06:00
Christopher Allan Webber
86d01f0816 Merge branch 'stable'
Conflicts:
	mediagoblin/i18n/templates/en/mediagoblin.po
	mediagoblin/plugins/archivalook/tools.py
2015-12-19 21:57:27 -06:00
Jessica Tallon
f1db51e4db Fix bug on the OAuth client deauthorization page
An exception was raised when a user tried to go to the authroization page
this occured when we changed the field names on the models from "user" to
actor. This patch corrects the query and resolves the error.
2015-12-20 01:54:55 +00:00
ayleph
6e38fec80e Fix Issue 5375 Deprecated function in video thumb
This patch fixes issue 5375 by replacing a function call that has
been removed in recent versions of PIL with the recommended
replacement.

(cherry picked from commit 564a48e018bcd786aa32b232cb7216be3ef3fb5e)
2015-12-20 00:51:13 +03:00
ayleph
564a48e018 Fix Issue 5375 Deprecated function in video thumb
This patch fixes issue 5375 by replacing a function call that has
been removed in recent versions of PIL with the recommended
replacement.
2015-12-20 00:47:02 +03:00
Christopher Allan Webber
13f187992a Kludgey documentation fix so that python 2 does not break with flup
See also Issue #5373
2015-12-14 14:19:20 -06:00
Ben Sturmfels
e61dea3b05 Add "Add media" button on home page when no media is present.
This is an addition to the button hidden in the top toolbar.
2015-12-10 11:33:10 -06:00
Christopher Allan Webber
600a170ecf Fix issue #5372: test_comment_notification fails with werkzeug 0.11 or newer
Formerly like:
   chris commented on your post (​http://localhost:80/u/otherperson/m/some-title/c/1/#comment) at GNU MediaGoblin

With werkzeug 0.11.0 or higher:
    chris commented on your post (​http://localhost/u/otherperson/m/some-title/c/1/#comment) at GNU MediaGoblin

Easy enough just to be flexible.
2015-12-10 11:29:20 -06:00
ayleph
e2b44bd7a7 Fix issue 983 PDF UnicodeDecodeError
Parse PDF lines as unicode to prevent UnicodeDecodeError when a
non-ASCII character is encountered.
2015-12-10 11:11:42 -06:00
Jessica Tallon
fd07dd6da9 Fix #5363 - Collections don't serialize correctly 2015-11-25 14:57:46 +00:00
Jessica Tallon
0d053bff98 Added test for #5356 - Read someone else's feed
This adds a test and improves a previous test for the ability to read
someone elses feed. Previously it was not possible however this has
since been patched and this test checks for that.
2015-11-24 10:45:23 +00:00
ayleph
34f1d8a264 Allow API client to GET another user's outbox
Signed-off-by: Jessica Tallon <tsyesika@tsyesika.se>
2015-11-24 10:00:26 +00:00
Jessica Tallon
89068c2bdb Fix #5354 & #5355 - Fix Graveyard.serialize
Graveyard.serialize raised an exception as the deleted datetime
objects where not being converted to strings for json encoding. It
also didn't deal with the case when there was an actor, it now calls
the actor's serialize method as it should.

Thanks to Alyeph who provided the patches for both of these.
2015-11-23 17:27:32 +00:00
ayleph
fb071a38fe Use urljoin to create proper feed media URLs 2015-11-19 16:16:40 -06:00
ayleph
ba6d2d7e78 Fix for issue 5070 gst incomplete file
Seek tmp_media_file to 0 before attempting to discover the file type.
This prevents the following error when discovering mp4 video files.

"gst-stream-error-quark: This file is incomplete and cannot be played"
2015-11-19 16:05:25 -06:00
Daniel Krol
17eb7786b6 Fix add collection view for new schema 2015-11-09 00:13:53 -08:00
Ben Sturmfels
5acbb79da5 Fix minor grammatical error 'settings' -> 'setting'. 2015-11-05 15:54:12 -06:00