4939 Commits

Author SHA1 Message Date
Boris Bobrov
41076dc96b Fix occurence of unicode()
Fix unicode() -> six.text_type()
2016-02-01 01:43:36 +01:00
Boris Bobrov
db6cc0c061 Change uploader to actor
Class User doesn't have field `uploader` any more, instead there
`actor`. Fix several uses of `uploader` to `actor`.
2016-02-01 00:35:42 +01:00
Boris Bobrov
a2608d6b59 changes to BaseProcessingFail arguments usage 2016-02-01 00:30:32 +01:00
Boris Bobrov
75972f0afa some fixes to the panel looks 2016-02-01 00:30:30 +01:00
Boris Bobrov
906a00b667 added filtering by entry state in processing panel 2016-02-01 00:29:44 +01:00
Boris Bobrov
be9262b4d4 included plugin from previous commit to mediagoblin.ini 2016-02-01 00:29:43 +01:00
Boris Bobrov
728ee1df3c added a plugin to display information about entries in processing
Conflicts:
	mediagoblin/templates/mediagoblin/base.html -- resolved by using
	the original file and manually adding pieces from my commit
2016-02-01 00:28:32 +01:00
Boris Bobrov
e3663c7be1 changed the way we save information about exceptions 2016-01-28 22:04:44 +01:00
Boris Bobrov
4dd814a945 moved styles to a css file; more fixes to templates 2016-01-28 22:04:42 +01:00
Boris Bobrov
a186505a8a removed h2 from media panel 2016-01-28 22:03:46 +01:00
Boris Bobrov
d59c2298e4 removed querying of unused metrics in media panel 2016-01-28 22:03:44 +01:00
Boris Bobrov
9ab3c66cf1 processing panel new looks 2016-01-28 22:03:11 +01:00
Loic Dachary
7c9af02ab6 Fix #5408 - ignore non-int offset in api feed
In the same fashion limit=BAD fallsback to the default value,
fallback to zero when offset=WORSE.

Also add test coverage verifying limit/offset do the right thing.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-01-25 12:09:19 -08:00
Loic Dachary
63b5959fd4 Fix #947 - media_type configuration files location
Document the location of the config_spec.ini files for media_types.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-01-22 11:10:45 -08:00
Boris Bobrov
45189f6dfb Merge branch 'master' of git.sv.gnu.org:/srv/git/mediagoblin 2016-01-22 10:32:35 +03:00
Boris Bobrov
45aa5360d6 Make freesound compatible with python3
Freesound is a lib used for audio processing. Unfortunately, it doesn't
work with python3.

It lives in extlib, so we don't own the code. But, since the patch is
pretty trivial, it was decided to merge it anyway and propose the fix to
upstream. Which was done in https://github.com/MTG/freesound/pull/700 .
Also, a bugreport was opened to use upstream version instead of our
local, when it gets merged, ticket 5403.
2016-01-22 01:36:27 +03:00
Christopher Allan Webber
64c035b39f Issue #5394: Wrong url for forgot_password in basic_auth plugin
Fix by jerome.  Thank you!
2016-01-21 12:37:50 -08:00
宋文武
ea309bff97 Pass filename instead of file object when calling PIL.Image.save() 2016-01-21 12:27:57 -08:00
Boris Bobrov
525e851e17 Fix an occurence of print ... to print(...) 2016-01-21 23:19:31 +03:00
Loic Dachary
bbe0855651 Fix #1096 - allow - in usernames
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-01-21 11:56:41 -08:00
Ben Sturmfels
2fdc14a242 trac#5397: Allow decode_request to parse content-type headers with extra options.
It previously parsed "Content-Type: application/x-www-form-urlencoded", but not "Content-Type: application/x-www-form-urlencoded; charset=utf-8".
2016-01-21 10:53:54 -08:00
Jessica Tallon
4c77f3d563 Fix #5398 and #5395 - Fix tests failing due to problem creating connection for alembic
For some reason the alembic connection wasn't seeing any tables that existed
however the existing connection works well and we shouldn't be creating a brand
new one when we have one ready to use. I've used a little bit of a hack due to our
old version of alembic.

After 0.7.5 of alembic it offers a `Config.attributes` dictionary which is designed to
allow you to pass your connection/engine/whatever to the env.py config script so you're
not required to create new ones. As we're on an older version I just create a dictionary
with the same name and use it as otherwise documented. It seems this is the suggested
fix for #5395 and it fixes #5398 too.
2016-01-20 09:09:42 +00:00
Jessica Tallon
8de5a9319a Fix #5390 - Create migration to delete Notifications and fix Report
When a user deleted media or other objects any notificationn objects or reports
would cause errors as the object doesn't exist anymore. This now removes them or
sets them to None as expected by the code. This also adds some code to the base
deletion code to make sure this happens when an object is deleted.
2016-01-20 07:17:19 +00:00
Loic Dachary
8b4645dfd4 Fix #1099 - remove x mode from ini file
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-01-19 17:28:13 -08:00
Loic Dachary
6ec0393df0 Fix #5359 - unpriviledged -> unprivileged 2016-01-19 15:19:08 -08:00
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