Commit Graph

5242 Commits

Author SHA1 Message Date
Michael Lynch
82c2f9a912 Removing flup and fastcgi from documentation
flup is not supported on Python3, so MediaGoblin doesn't have a supported way to enable FastCGI support.

This change removes all references to flup and FastCGI and updates deployment instructions to use simple HTTP forwarding with nginx to access mediagoblin's non-static resources.
2020-04-14 20:45:54 -04:00
Ben Sturmfels
cbd119168c Note how to run test suite under Docker. 2020-04-14 18:40:55 +10:00
Ben Sturmfels
912e5d2b41 Fix "KeyError: 'No such transport: sqlite. Did you mean sqla?'" in tests.
This is caused by Celery dropping the "sqlite" transport alias from version
4.3.0, so I've pinned an upper limit.
2020-04-14 18:02:12 +10:00
Ben Sturmfels
486f90a7f7 Remove "git submodule init && git submodule update" from Dockerfiles.
These commands are run by `bootstrap.sh`. Also includes a couple more tidy-ups.
2020-04-14 16:40:38 +10:00
Ben Sturmfels
72047cbe68 Require jinja2<3.0.0 due to use of f-strings. 2020-04-10 07:14:39 +10:00
Ben Sturmfels
15c45a820f Decode request.query_string before use.
Prior to this change, when pagination kicks in on the user management or report
management panel, the following exception is raised:

  TypeError: a bytes-like object is required, not 'str'

The cause is that `request.query_string` in the URL parameters in raw bytestring
form as per Werkzeug documentation.
2020-04-09 15:53:49 +10:00
Ben Sturmfels
f9112bd883 Revert "Decode request.query_string before use."
This reverts commit b6fba85400.
2020-04-09 15:48:21 +10:00
Ben Sturmfels
b6fba85400 Decode request.query_string before use.
This doesn't seem to be an issue in my Guix SD/Python 3.7 testing, but hit an
issue on Debian 9/Python3.5 where concatenating text to `request.query_string`
was causing the error:

  TypeError: a bytes-like object is required, not 'str'

This clearly hasn't been an issue in the past though, so I suspect there's a
library somewhere that's on a different version and is behaving differently.
2020-04-09 15:29:51 +10:00
Ben Sturmfels
15ddb7c0ec Document SSL/TLS SMTP options. 2020-04-07 16:45:17 +10:00
Ben Sturmfels
f1c288b1d8 Fix Jorge's audio upload workaround in Python 3.
Unfortunately now the player isn't showing up because there's no thumbnail.
2020-04-07 16:35:09 +10:00
Ben Sturmfels
882cd7ea3e Note possible future steps for Python 3 audio thumbnailing. 2020-04-02 17:18:39 +11:00
Jorge
2b487fc16d Use audio icon when spectrogram fails. Add note to doc:media-types.
In addition to side-stepping spectrograms completely in Python 3 in 1038aea8,
this commit adds some fallbacks that will help with potential issues in Python 2.

Fixes Issue #5457

Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
Author: Jorge <mediagoblin@gybs.waa>
2020-04-02 16:58:11 +11:00
Ben Sturmfels
853147339b Fix broken Dockerfile reference. 2020-04-02 15:29:30 +11:00
Ben Sturmfels
bf989f7227 Add Muto to AUTHORS. 2020-04-02 14:00:10 +11:00
Muto
5252ef9f17 Add visual feedback on link hover
Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2020-04-02 13:57:16 +11:00
Ben Sturmfels
1038aea822 Fix audio thumbnailing once and for all.
This change adds a Python 3-specific audio thumbnailer that side-steps the
bundled Python 2-only `audioprocessing` module. Instead of an audio spectrogram,
Python 3 users will get a static image.

This also allows me to remove my ineffective customisations to
`audioprocessing`, returning it to the upstream version as should always be the
case for vendored code in "extlib".
2020-04-01 16:52:05 +11:00
Ben Sturmfels
ad3a0aea83 Handle moved SharedDataMiddleware in werkzeug >= 0.15.0. 2020-04-01 15:32:42 +11:00
Ben Sturmfels
dee31a3984 Note werkzeug breaking in Guix.
The `python-lxml` package has also moved.
2020-04-01 15:30:25 +11:00
Ben Sturmfels
5c77906947 Pin werkzeug < 1.0.0.
In 1.0.0, the werkzeug.contrib module was removed which was required for `werkzeug.contrib.atom.AtomFeed`.
2020-04-01 15:26:47 +11:00
Ben Sturmfels
b89226422c Note potential issues with guix environment --pure. 2019-11-27 22:31:16 +11:00
Ben Sturmfels
c5a6bbdc88 Use items() for Python 3 support. 2019-11-27 22:30:19 +11:00
Ben Sturmfels
7075a065a2 Extend install instructions for raven plugin. 2019-11-27 22:14:52 +11:00
Ben Sturmfels
1e950c0d17 Rename Dockerfiles to be more specific. 2019-11-19 12:55:59 +11:00
Ben Sturmfels
868918690b Document and improve Docker handling of mounted source code directory. 2019-11-19 12:53:48 +11:00
Ben Sturmfels
48208c278c Prevent warning when importing GstPbutils.
Warning was:

PyGIWarning: GstPbutils was imported without specifying a version first. Use gi.require_version('GstPbutils', '1.0') before import to ensure that the right version gets loaded.
2019-11-01 16:41:45 +11:00
Ben Sturmfels
e34916ee8b Add Olivier Mehani to AUTHORS. 2019-09-20 10:39:35 +10:00
Olivier Mehani
d269b1a839 Add datetime_format config option.
Moves the datetime_format used in various places to the config and allows a
global override per site.

Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
2019-09-20 10:38:09 +10:00
Ben Sturmfels
e01fab9333 Merge branch swo-gitignore.
Thanks mlynch for the contribution!
2019-09-20 10:01:10 +10:00
Ben Sturmfels
197e81d5f9 Add expression to ignore Vim temporary swap files.
I gather that Vim continues back through the alphabet with .swp, swo, swn etc:
https://groups.google.com/forum/#!msg/vim_use/JBHSs3kPPJU/X9WeMsZcfWAJ
2019-09-20 09:58:15 +10:00
Ben Sturmfels
d20e307ab3 Note use of direnv with guix. 2019-09-19 17:28:48 +10:00
Ben Sturmfels
46ccfabcbe metadata_display: Refine spacing. 2019-09-18 17:36:36 +10:00
Ben Sturmfels
2ca068851b metadata_display: Improve default alignment/spacing of metadata. 2019-09-18 17:28:43 +10:00
Ben Sturmfels
b1d50f7beb Even up top/bottom margins around header dropdown button.
Bottom margin was less than top margin.
2019-09-18 16:02:38 +10:00
Ben Sturmfels
c33168b3d8 Add basic duplicate prevention for batchaddmedia. 2019-09-18 15:58:24 +10:00
Ben Sturmfels
ad14aed02b Add omitted --system-site-packages for Python 3 on Guix, add update_extlib.sh docs. 2019-09-18 15:57:16 +10:00
Ben Sturmfels
25bc7ea7f6 Update metadata_display plugin for Python 3.
Switching from iteritems() to items() is technically less memory efficient on
Python 2, but this appeared be a significantly cleaner approach than adding six
to the template context. It's also the right choice assuming the project will at
some point go Python 3 only.
2019-09-18 15:30:32 +10:00
Ben Sturmfels
8096beab5c Add Python 3 docker-compose recipe for MediaGoblin hacking. 2019-09-16 18:08:57 +10:00
Ben Sturmfels
c3096e30d5 Reorder Python 2 Dockerfile to install dependencies together. 2019-09-16 17:27:05 +10:00
Ben Sturmfels
63a92e3bbd Add Python 2 & 3 Docker files for MediaGoblin hacking. 2019-09-12 20:23:08 +10:00
Ben Sturmfels
97dcfe3725 Work around lack of scikits.audiolab support on Python 3. 2019-09-12 19:59:11 +10:00
Ben Sturmfels
8f18381bbc batchaddmedia: Simplify the Python 2 & 3 unicode handling.
To avoid issues with quotes, I've replaced the manual CSV handling with
csv.DictReader and simplified the unicode handling down to a single line. I
don't believe any special encoding is required when writing to the database.

This has been tested by importing a CSV with braille characters on Python 3 and
Python 2.
2019-09-12 19:39:54 +10:00
Ben Sturmfels
eb36543364 Remove unicode literals in batchaddmedia. 2019-09-12 15:41:36 +10:00
Ben Sturmfels
88ecf6a340 Fix URL-based importing with batchaddmedia command.
The command was raising "io.UnsupportedOperation: seek" for URL-based imports
and didn't support HTTPS.
2019-09-12 14:47:45 +10:00
Ben Sturmfels
9618899480 Fix bulkupload documentation example.
The `bulkupload` command expects "dc:title", rather than "dcterms:title".
Similar for description.
2019-09-12 14:39:11 +10:00
Ben Sturmfels
45400905e7 Note issues uploading H264 video under Guix. 2019-09-12 14:38:52 +10:00
Ben Sturmfels
2764934602 Provide an update_extlib.sh alternative for Guix. 2019-09-09 16:24:45 +10:00
Ben Sturmfels
f0a09ae047 Update guix-env.scm for use with current version of Guix. 2019-09-09 15:20:52 +10:00
Michael Lynch
f584494b8a Adding *.swo to gitignore 2018-11-10 11:03:34 -05:00
Boris Bobrov
09cd88b033 require higher version of six due to installation problems 2018-08-13 10:53:52 +02:00
Boris Bobrov
a65ffb4b69 Fix saving original of the video
Original of the video was not saved because info about it was not
written to the database. Fixed that.

Also removed original video from get_all_media listing. The method is
weird, we should evaluate whether it is video-specific and how to
generalize it.
2018-07-13 19:05:38 +02:00