Christopher Allan Webber
dd41141d23
Much more nicely formed form error check
...
This doesn't rely on checking HTML output... thus, cleaner.
This commit sponsored by Alexandre Guédon. Thank you!
2014-09-16 15:25:30 -05:00
Christopher Allan Webber
16450dada2
Fix error check in test_edit.py for python 3
...
This isn't the nicest of checks... we should probably be checking the
actual form passed into the context. But for now, it's a fix.
2014-09-16 15:15:13 -05:00
Christopher Allan Webber
7893d43a8f
Fix exception catching on python 3
...
This commit sponsored by Paul Smith. Thank you!
2014-09-16 15:08:28 -05:00
Christopher Allan Webber
13f37e75eb
Fix iteritems usage on python 3
...
This commit sponsored by Ben (Free Software Melbourne) Finney. Thanks!
2014-09-16 15:07:33 -05:00
Matt Molyneaux
584520e325
The scheduled garbage collection task was not being called due to it being misnamed
...
Fix #968
2014-09-16 21:05:32 +01:00
Christopher Allan Webber
21cbf8294e
json.loads(request.body) => json.loads(response.body.decode()))
...
This fixes python 3 stuff.
This commit sponsored by James Reilly. Thanks, James!
2014-09-16 14:56:13 -05:00
Christopher Allan Webber
fa3f46d714
Import mock correctly on py3
...
This commit sponsored by Andrew McNicol. Thank you!
2014-09-16 14:46:02 -05:00
Christopher Allan Webber
b6774d339a
Simplify things here and use io.open
2014-09-16 14:37:52 -05:00
Christopher Allan Webber
58a7292fed
Fix test_legacy_api.py
...
Or rather, reimplement one of Berker's fixes and add one of mine:
- add back the http_auth_headers fix Berker wrote
- decode to json when testing the response.body, since we have no
idea what the order will be here
2014-09-16 14:37:36 -05:00
Christopher Allan Webber
3a02813c7a
Import mock from unittest if on py3
2014-09-16 14:26:40 -05:00
Christopher Allan Webber
f6bad0eb26
Merge branch 'master' into merge-python3-port
...
Has some issues, will iteratively fix!
Conflicts:
mediagoblin/gmg_commands/__init__.py
mediagoblin/gmg_commands/deletemedia.py
mediagoblin/gmg_commands/users.py
mediagoblin/oauth/views.py
mediagoblin/plugins/api/views.py
mediagoblin/tests/test_api.py
mediagoblin/tests/test_edit.py
mediagoblin/tests/test_oauth1.py
mediagoblin/tests/test_util.py
mediagoblin/tools/mail.py
mediagoblin/webfinger/views.py
setup.py
2014-09-16 14:01:43 -05:00
Christopher Allan Webber
99c466045a
Fix unicode error in pdf media type
...
(we're checking against bytestrings, so make that explicit)
2014-09-12 09:30:46 -05:00
Jessica Tallon
8998300b98
Merge branch '945-well-known'
...
* 945-well-known:
Add /.well-known/webfinger API to lookup user hrefs
Add XRD+XML formatting for /.well-known/host-meta
2014-09-08 17:55:03 +01:00
Jessica Tallon
1bce996181
Add /.well-known/webfinger API to lookup user hrefs
2014-09-08 17:54:03 +01:00
Odin Hørthe Omdal
1b4e199668
Raw image mediatype had a non-unicode logging call
...
Was causing UnicodeDecodeError when file/folder was not ascii.
Fixes bug #935 .
2014-09-07 09:43:49 -05:00
Odin Hørthe Omdal
4f1a5148cb
Add __repr__ for Collection and CollectionItem
2014-09-07 09:42:07 -05:00
Christopher Allan Webber
b29b4e175f
Handle cr2 files through the raw_image media type
...
This commit sponsored by Jim Campbell. Hey, I know that guy! Thanks
Jim! :)
2014-09-06 10:57:13 -05:00
Jessica Tallon
0af1b85998
Add XRD+XML formatting for /.well-known/host-meta
2014-09-05 14:17:42 +01:00
Jessica Tallon
b61519ce53
Only have Model.activity for activity compatable objects/targets
2014-09-03 15:58:40 +01:00
Jessica Tallon
0421fc5ee8
Fix migrations and refactor object_type
...
- Make changes to objectType to be more pythonic "object_type"
- Move object_type to mixins rather than be on the models
- Convert migrations to sqlalchemy core rather than ORM (fix)
- Change TYPES to use descriptive strings rather than numbers
2014-09-02 16:38:52 +01:00
Christopher Allan Webber
f251d99828
now in the 0.7.1.dev cycle
2014-08-27 13:28:51 -05:00
Jessica Tallon
23bf7f3b02
Oops forgot to add medigoblin.tools.federation
2014-08-27 15:32:59 +01:00
Jessica Tallon
ce46470c02
Add ActivityIntermediator table and refactor some of Activity model
...
- This has introduced a intermediatory table between object/target and
the activity. This allows for multiple activities to be associated
with one object/target.
- This moves some of the methods off Activity model into a mixin which
didn't need to interact with database things.
- This also cleaned up the migrations as well as adding retroactive
creation of activities for collection creation.
2014-08-27 15:20:27 +01:00
Jessica Tallon
1c15126819
Add better support for targets on Activities
...
This adds betters upport for targets in the content generation
and on the model itself. Adding getters for properties which would
otherwise require looking up e.g. get_author.
2014-08-26 10:19:39 +01:00
Christopher Allan Webber
5a9111063f
At version 0.7.0, at last!
2014-08-25 15:31:55 -05:00
Christopher Allan Webber
3db594557a
Committing extracted and compiled translations
2014-08-25 14:44:41 -05:00
Christopher Allan Webber
551027ab0e
Committing present MediaGoblin translations before pushing extracted messages
2014-08-25 14:44:17 -05:00
Jessica Tallon
b949201152
Create activity model and add activity creation
...
This creates the Activity and Genrator models from the Activity
Streams spec and. I then created a migration which retro-actively
create activities for media uploaded and comments created. Through
out the code I've added so automatically activties are created when
a user peforms an action (uploading media, commenting, etc.).
2014-08-22 23:18:01 +01:00
Jessica Tallon
51f4911855
Make blog_post_listing easier to read
...
This is Elronds change on #948 . As 'blog_slug' is always
set in request.matchdict there is no need to do a default-none
get on the dictionary. This change just makes it easier to read.
2014-08-19 14:30:45 +01:00
ayleph
b56cd89eb8
List blogs by URL user rather than request user
...
The blog_post_listing function in mediagoblin/media_types/blow/views.py
attempts to access blogs based on the requesting user rather than the url
user. This results in server errors when an unauthenticated user attempts to
follow a link from another user's blog post listing, and 404 errors when an
authenticated user attempts to follow a link from another user's blog post
listing.
This change bases blog post listings on the URL user rather than the request
user.
2014-08-19 14:30:45 +01:00
Odin Hørthe Omdal
b694c3de34
Add new hook 'collection_add_media'
2014-08-18 23:18:46 +02:00
Jessica Tallon
9246a6ba89
Tidy up federation code and add tests to cover more of the APIs
2014-08-18 10:51:32 -05:00
Jessica Tallon
32ff6f4dc0
Use oauthlib's safe characters when generating client_key and client_secret
2014-08-18 10:51:15 -05:00
Christopher Allan Webber
a7800e6da8
Fix a python2.6 compatibility issue. Removing a dict comprehension.
...
This commit sponsored by Christopher Beppler. Thanks!
2014-08-18 10:40:08 -05:00
Christopher Allan Webber
cbc5f9500c
Always remove the session when running check_db_up_to_date()
...
This commit sponsored by Francois Marier. Thank you!
2014-08-15 16:30:59 -05:00
Berker Peksag
39a9035487
Implement ServeCommand.{loadserver, loadapp}.
...
This is partly port from PasteScript.
2014-08-15 23:07:35 +03:00
Berker Peksag
051c728c6e
Add an initial "gmg serve" implementation.
...
The CLI is similar to "paster serve".
2014-08-15 23:02:22 +03:00
Berker Peksag
3dbdb061ea
Improve mediagoblin._compat.py2_unicode.
...
- Encode obj.__repr__() to bytestring if its type is unicode in Python 2.
- Add internal encode_to_utf8() decorator.
- Do not raise an exception if a class does not have an __str__() method,
just warn.
2014-08-15 18:57:48 +03:00
Berker Peksag
2064ad9450
Move the AlembicMigrationManager to top of the module.
...
Also, add a simple docstring.
2014-08-15 15:40:35 +03:00
Berker Peksag
de51eca53f
Provide a better manager API for Alembic.
2014-08-15 15:39:45 +03:00
Berker Peksag
65f20ca435
Add initial Alembic migrations.
2014-08-13 19:30:23 +03:00
Berker Peksag
7df0793441
Fix dict.keys() in Python 3.
2014-08-13 19:27:49 +03:00
Berker Peksag
4930c2adbd
Fix a comment.
2014-08-13 19:27:23 +03:00
Jessica Tallon
8cfa4071bf
Forgot to add starttls_config.ini
2014-08-12 21:47:23 +01:00
Jessica Tallon
7ffd4cf4b5
Fix #861 - Add unit test and documentation for email_smtp_force_starttls
2014-08-12 19:23:19 +01:00
Christopher Allan Webber
3b104bbcef
Elrond keeps pointing out places I should "is not None" at :)
2014-08-08 13:24:59 -05:00
Christopher Allan Webber
113d1a280e
Okay, we don't know that indexes are falsey, so let's make it clearer. Yeek!
2014-08-08 13:18:57 -05:00
Christopher Allan Webber
72f42a408d
this negation needs parens.
2014-08-08 13:12:33 -05:00
Christopher Allan Webber
f2a6db9088
Pull the indexes out of the dictionary directly
...
Instead of checking for their keys and pulling them out later, that is.
2014-08-08 11:39:44 -05:00
Christopher Allan Webber
ed0b981edc
If the constraint already exists, roll back to a sane state.
2014-08-08 09:50:16 -05:00