Christopher Allan Webber [Tue, 26 Feb 2013 16:33:51 +0000 (10:33 -0600)]
Small PEP-8 compliance fix.
This commit sponsored by Mats Sjöberg. Thanks!
Christopher Allan Webber [Tue, 26 Feb 2013 16:15:26 +0000 (10:15 -0600)]
Import sqlalchemy's and_ and use it in our select statement
This commit sponsored by Hans-Jörg Dollansky. Thank you!
Christopher Allan Webber [Tue, 26 Feb 2013 15:58:25 +0000 (09:58 -0600)]
And of course, we need to actually commit at the end of a migration.
This commit sponsored by Tamas Kemenczy. Thanks, Tamas!
Christopher Allan Webber [Mon, 25 Feb 2013 22:35:05 +0000 (16:35 -0600)]
Dope'ily missed .count() on the query where we're counting
Thanks for catching, Elrond.
This commit sponsored by Graham King. Thank you!
Christopher Allan Webber [Mon, 25 Feb 2013 22:16:21 +0000 (16:16 -0600)]
Supplying migrations for a bold new era of mediagoblin entry slugs
Okay, that's a totally confusing statement, but the docstring of this
migration summarizes it well:
Entries without slugs now display differently in the url like:
/u/cwebber/m/id=251/
... because of this, we should back-convert:
- entries without slugs should be converted to use the id, if possible, to
make old urls still work
- slugs with = (or also : which is now also not allowed) to have those
stripped out (small possibility of breakage here sadly)
This commit sponsored by John Sullivan. Thanks johnsu01! :)
Christopher Allan Webber [Mon, 25 Feb 2013 18:15:12 +0000 (12:15 -0600)]
You can now set the PASTE_CONFIG environment variable to control logging setup
So this should work:
PASTE_CONFIG=/path/to/paste_foo.ini ./lazycelery.sh
Thanks to Laurent Fournier for sponsoring this commit!
Christopher Allan Webber [Sun, 24 Feb 2013 22:37:39 +0000 (16:37 -0600)]
Removing stray character from pythonsnake's doc change and filling comment
This commit sponsored by Johannes Knabbe. Thank you!
pythonsnake [Sun, 10 Feb 2013 13:07:09 +0000 (14:07 +0100)]
Fix bug 461
Jef van Schendel [Sun, 24 Feb 2013 20:09:16 +0000 (21:09 +0100)]
Improved dropdown styling, part deux
Jef van Schendel [Sun, 24 Feb 2013 19:54:10 +0000 (20:54 +0100)]
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Jef van Schendel [Sun, 24 Feb 2013 19:53:34 +0000 (20:53 +0100)]
Improved dropdown styling
Christopher Allan Webber [Sun, 24 Feb 2013 19:53:15 +0000 (13:53 -0600)]
Changing the order so that config_spec.ini is mentioned after mediagoblin_local.ini
This commit sponsored by Matteo Settenvini. Thanks!
Christopher Allan Webber [Sun, 24 Feb 2013 19:52:13 +0000 (13:52 -0600)]
Merge remote-tracking branch 'refs/remotes/pythonsnake/581_config'
Christopher Allan Webber [Sun, 24 Feb 2013 19:06:53 +0000 (13:06 -0600)]
Merge remote-tracking branch 'refs/remotes/pythonsnake/629_autoplay'
Christopher Allan Webber [Sun, 24 Feb 2013 18:42:17 +0000 (12:42 -0600)]
Renaming "extrahead" template hooks to "head".
As Elrond points out, the "extra" is implied by it being a hook!
This commit sponsored by Andrew Fustini. Thanks, Drew!
Christopher Allan Webber [Sun, 24 Feb 2013 18:33:39 +0000 (12:33 -0600)]
extra_head template hook. This will allow plugins to add extra js/css more easily.
This commit sponsored by Moritz Berberich. Thank you!
Elrond [Sun, 24 Feb 2013 15:09:45 +0000 (16:09 +0100)]
Add owner to list of collections.
When listing the collections, that a media is contained in,
also show the owner of the collection.
Also simplify the whole looping a lot.
Elrond [Sun, 24 Feb 2013 15:08:55 +0000 (16:08 +0100)]
Use media.id for collecting media too.
Also remove some useless whitespace while at it.
Elrond [Sun, 24 Feb 2013 10:30:17 +0000 (11:30 +0100)]
Use the media id for attachmemt editing.
And remove some stray white space from the output.
Christopher Allan Webber [Sat, 23 Feb 2013 16:47:51 +0000 (10:47 -0600)]
Committing extracted and compiled translations
Christopher Allan Webber [Sat, 23 Feb 2013 16:46:56 +0000 (10:46 -0600)]
Committing present MediaGoblin translations before pushing extracted messages
Joar Wandborg [Fri, 22 Feb 2013 21:36:00 +0000 (22:36 +0100)]
Fix stray comma in listings.views.atom_feed
Joar Wandborg [Fri, 22 Feb 2013 21:20:06 +0000 (22:20 +0100)]
Added some empty templates
- Make it possible for site owners to hook into base.html without
tainting the repository.
András Veres-Szentkirályi [Thu, 21 Feb 2013 10:32:01 +0000 (11:32 +0100)]
simplified get_useful
András Veres-Szentkirályi [Thu, 21 Feb 2013 10:31:25 +0000 (11:31 +0100)]
use dict.iteritems() instead of dict.items()
András Veres-Szentkirályi [Thu, 21 Feb 2013 10:31:08 +0000 (11:31 +0100)]
use list expression instead of 3-deep for
András Veres-Szentkirályi [Thu, 21 Feb 2013 10:30:23 +0000 (11:30 +0100)]
simplified clean_exif
András Veres-Szentkirályi [Thu, 21 Feb 2013 10:29:24 +0000 (11:29 +0100)]
close file properly and remove unneeded variable
András Veres-Szentkirályi [Thu, 21 Feb 2013 10:28:55 +0000 (11:28 +0100)]
typofix in comment
András Veres-Szentkirályi [Thu, 21 Feb 2013 10:15:14 +0000 (11:15 +0100)]
use key in dict instead of key in dict.keys()
András Veres-Szentkirályi [Thu, 21 Feb 2013 09:58:30 +0000 (10:58 +0100)]
removed unused import cgi.FieldStorage
András Veres-Szentkirályi [Thu, 21 Feb 2013 09:51:13 +0000 (10:51 +0100)]
removed unused import re
András Veres-Szentkirályi [Thu, 21 Feb 2013 09:48:52 +0000 (10:48 +0100)]
removed unnecessary collection lookup
András Veres-Szentkirályi [Thu, 21 Feb 2013 09:48:18 +0000 (10:48 +0100)]
removed unused import NotFound
Christopher Allan Webber [Fri, 22 Feb 2013 21:04:06 +0000 (15:04 -0600)]
Changing name for atom feed view to be more generic than tags.
This commit sponsored by Ben Hutchings. Thanks, Ben!
Sebastian Spaeth [Tue, 13 Nov 2012 10:35:28 +0000 (11:35 +0100)]
Integrate all atom feed in template
Embed the atom feed link in the root template (most recent media
page) for easier discovery. Delete the (listings/all.html) template
as contributed in commit
195e79098b5 as it was unused and the feed
is essentially showing the most recent media anyway.
Sebastian Spaeth [Tue, 27 Mar 2012 20:58:58 +0000 (15:58 -0500)]
Adding an Atom RSS feed for all media on the server
Go to /atom/ in your browser to see it.
Elrond [Fri, 22 Feb 2013 13:19:19 +0000 (14:19 +0100)]
Create wtforms_util.render_label(_p) and use it around.
- This makes many places more readable.
- Gives us translation in two places.
- Allows easier changing of labels in a central place.
Elrond [Mon, 4 Feb 2013 20:25:01 +0000 (21:25 +0100)]
Use wtforms_util.render_field_div more in media_collect.html
If we have to render fields individually, we still can use
wtforms_util.render_field_div for each field. Makes things
much smaller and readable.
Christopher Allan Webber [Thu, 21 Feb 2013 23:58:27 +0000 (17:58 -0600)]
Merge remote-tracking branch 'aleksej/632_config_spec_comment_typo'
Christopher Allan Webber [Thu, 21 Feb 2013 22:29:16 +0000 (16:29 -0600)]
Remove "translation legos" and linkify the tag to more generic tag listing
By "translation legos" I mean having multiple strings to be translated
appended together. This isn't a good idea because you can't assume
that syntax will work together in the same way in another language, so
you may be making things hard or impossible for translators.
Between this and the last commit, this means that tags now link to
user tagged media specifically, and if people want a more general tag
listing, they can click on the tag link to get to a more general
listing. I feel this is a good and intuitive route to handling this.
This sponsored commit brought to you by Debarshi Ray! Thank you!
Christopher Allan Webber [Thu, 21 Feb 2013 22:19:43 +0000 (16:19 -0600)]
Making the tags on media pages point to the user's tag listing specifically.
This commit sponsored by Torsten Meissner. Thanks, Torsten!
Christopher Allan Webber [Thu, 21 Feb 2013 22:13:56 +0000 (16:13 -0600)]
Fixing user gallery tags filter to be on slug rather than name.
This commit sponsored by Kat Walsh. Thanks, Kat!
Christopher Allan Webber [Thu, 21 Feb 2013 21:55:26 +0000 (15:55 -0600)]
Merge remote-tracking branch 'refs/remotes/spaetz/WIP/user_tag_gallery'
Runar Petursson [Fri, 15 Feb 2013 02:17:24 +0000 (10:17 +0800)]
plugins/api: fix for cross origin requests
The response headers were never getting set because of a bug in the
7c552c0
commit. This expands the loop into a more readable form and results in the
headers getting set.
Elrond [Tue, 19 Feb 2013 16:14:13 +0000 (17:14 +0100)]
Fix some small bits in base.html.
1. Add a trailing slash to the mediagoblin.org URL.
(The string changed anyway, so translations are not
affected more than already.)
2. Order was wrong for those two at the end (old version):
{% endblock mediagoblin_body %}
</div>
3. Fix some little indenting issues.
4. Remove some useless space from the output.
Elrond [Tue, 19 Feb 2013 12:34:13 +0000 (13:34 +0100)]
Merge remote-tracking branch 'pythonsnake/537_version'
* pythonsnake/537_version:
Added "version" before the version
Fix bug 537
Elrond [Mon, 18 Feb 2013 13:46:28 +0000 (14:46 +0100)]
Fix deleting media with attachments.
If one deletes a media with attachments, there have been
various problems:
1) If the file in the storage did not exist any more (maybe
because due to a previous deletion attempt?), the error
propagation failed, because the wrong thing was
gathered.
2) The attachment database entries were not deleted.
Using cascade for this, for now.
Also add a simple unit test, that tests both by having a
broken attachment on a media.
Joar Wandborg [Mon, 18 Feb 2013 13:41:34 +0000 (14:41 +0100)]
Fix errors in collection views
When a collection does not exist, render the 404 page.
Joar Wandborg [Wed, 13 Feb 2013 22:12:55 +0000 (23:12 +0100)]
Change from email format in tag URI to domain format
Also fixed a bug (thanks pyflakes)
Joar Wandborg [Sat, 2 Feb 2013 22:25:04 +0000 (23:25 +0100)]
Address concerns in Issue #543
- Fixed PEP-008 issues.
- Removed .user-{user} from the tag URI and put it before the domain,
such as {user}@{host} instead.
- Use year from collection.created instead of current year.
pythonsnake [Wed, 13 Feb 2013 15:56:24 +0000 (16:56 +0100)]
Mention mediagoblin/config_spec.ini
Elrond [Tue, 12 Feb 2013 23:02:56 +0000 (00:02 +0100)]
Add markdown notice to collection description.
Use wtforms_util.render_field_div on the collection
description, so that the markdown notice in the wtform is
actually rendered to html.
pythonsnake [Mon, 11 Feb 2013 15:57:33 +0000 (16:57 +0100)]
Added "version" before the version
Christopher Allan Webber [Sun, 10 Feb 2013 19:49:35 +0000 (13:49 -0600)]
Fixing MANIFEST.in: graft expects one directory per line
Christopher Allan Webber [Sun, 10 Feb 2013 19:47:44 +0000 (13:47 -0600)]
Updating MANIFEST.in for more files... trying to make this work on pypi :)
Joar Wandborg [Sun, 10 Feb 2013 19:19:13 +0000 (20:19 +0100)]
Tuned logging and added comments to 511 fix
pythonsnake [Sun, 10 Feb 2013 10:43:18 +0000 (11:43 +0100)]
Fixed issue #511.
pythonsnake [Sun, 10 Feb 2013 14:08:15 +0000 (15:08 +0100)]
Fix bug 629
pythonsnake [Sun, 10 Feb 2013 11:01:24 +0000 (12:01 +0100)]
Fix bug 537
Aleksej [Sun, 10 Feb 2013 10:13:46 +0000 (14:13 +0400)]
correct typo in a comment in config_spec.ini
Christopher Allan Webber [Sat, 9 Feb 2013 21:33:06 +0000 (15:33 -0600)]
Merge remote-tracking branch 'refs/remotes/elrond/sql/media_data'
Elrond [Sat, 9 Feb 2013 10:34:57 +0000 (11:34 +0100)]
Add type="text/javascript" for <script>.
Our jquery <script> tag did not have a proper type
attribute.
Jef van Schendel [Fri, 8 Feb 2013 22:30:32 +0000 (23:30 +0100)]
Add translation tags; remove unnecessary title attribute from link
Jef van Schendel [Fri, 8 Feb 2013 22:28:13 +0000 (23:28 +0100)]
Remove unused translation variable
Jef van Schendel [Fri, 8 Feb 2013 21:54:16 +0000 (22:54 +0100)]
Fix "Add to collection" button: remove icon, add text, add to collections.html
Jef van Schendel [Fri, 8 Feb 2013 21:08:17 +0000 (22:08 +0100)]
Remove the collection counter because it's not needed
Elrond [Sat, 26 Jan 2013 14:28:24 +0000 (15:28 +0100)]
Kill monkeypatching of ProcessingState.
And change the process_foo() API to accept a
processingstate now.
image and video are tested, the others are UNTESTED.
Elrond [Sat, 26 Jan 2013 14:08:12 +0000 (15:08 +0100)]
Also refactor "copy original into public storage".
This makes the processing code easier to read/write and
alos will help the reprocessing once we get to it.
Thanks to Joar Wandborg for testing!
Elrond [Sat, 26 Jan 2013 13:54:17 +0000 (14:54 +0100)]
Use ProcessingState for video.
Rewrite video to use the new ProcessingState.
Thanks to Joar Wandborg for testing!
Elrond [Thu, 24 Jan 2013 09:23:38 +0000 (10:23 +0100)]
ProcessingState: Document monkey patching.
Elrond [Wed, 23 Jan 2013 18:44:28 +0000 (19:44 +0100)]
Implement ProcessingState class and use for images
The idea is to have a class that has the knowledge of the
currently being processed media and also has tools for
that.
The long term idea is to make reprocessing easier by for
example hiding the way the original comes into the
processing code.
Joar Wandborg [Thu, 7 Feb 2013 21:35:42 +0000 (22:35 +0100)]
Use logging.config.fileConfig()
Instead of the monster I had built before.
Elrond [Wed, 6 Feb 2013 23:31:37 +0000 (00:31 +0100)]
Use system wide EXIF package, if available.
Created and tested by Simon Fondrie-Teitler.
Thanks!
Christopher Allan Webber [Tue, 5 Feb 2013 21:13:44 +0000 (15:13 -0600)]
Committing extracted and compiled translations
Christopher Allan Webber [Tue, 5 Feb 2013 21:12:27 +0000 (15:12 -0600)]
Committing present MediaGoblin translations before pushing extracted messages
Elrond [Tue, 5 Feb 2013 15:50:35 +0000 (16:50 +0100)]
Rename {{title}} to {{media_title}}.
Rename a variable in a translated string to make it easier
for translators to know what they're dealing with.
And add a <title/> block.
Elrond [Tue, 5 Feb 2013 15:25:19 +0000 (16:25 +0100)]
Mark "Collection" for translation in media_collect.
Elrond [Mon, 4 Feb 2013 20:26:09 +0000 (21:26 +0100)]
Merge remote-tracking branch 'aleksej/quotes_and_a_for_addcoll'
* aleksej/quotes_and_a_for_addcoll:
Small changes to "Add <media> to collection" string
Aleksej [Mon, 4 Feb 2013 20:07:47 +0000 (00:07 +0400)]
Small changes to "Add <media> to collection" string
Add quotation marks and "a" ("a" was proposed by Elrond).
Elrond [Mon, 4 Feb 2013 16:11:01 +0000 (17:11 +0100)]
Issue 621: Extract strings from hooked templates.
templates using the new hook system were not extracted
properly. One needs to add the new extension to the
extraction process as well.
Elrond [Mon, 4 Feb 2013 13:17:00 +0000 (14:17 +0100)]
Search for translation in all templates.
We missed to search for translatable strings in our plugins
and other things that might have templates.
The search is now for **/templates/**.html. That should
catch a lot more.
Elrond [Sat, 2 Feb 2013 19:40:19 +0000 (20:40 +0100)]
issue 615: config geolocation_map_visible gone.
The template in the geolocation plugin still used the old
config option. Just remove that. To enable it, you enable
the plugin. No need for extra config.
Tested by manwesulimo2004 (via IRC).
Elrond [Fri, 1 Feb 2013 15:33:53 +0000 (16:33 +0100)]
Drop backward compatibility for media_data backref.
Now we only support media_type backrefs with uselist=False.
Elrond [Fri, 1 Feb 2013 15:33:53 +0000 (16:33 +0100)]
Drop media_data_table property.
Only when creating a new media_data row, we need the table.
So load that locally in media_data_init().
Elrond [Fri, 1 Feb 2013 14:52:17 +0000 (15:52 +0100)]
Turn media.{backref_nam} from a list to a scalar.
For all our media_types, let the backref on the media_entry
be a scalar (there is only one media_data per media_entry)
instead of a list with zero or one entry.
The media_data toolchain on MediaEntry currently handles
both transparently.
Elrond [Fri, 1 Feb 2013 14:42:44 +0000 (15:42 +0100)]
Rewrite media_data handling to use relationships
Instead of doing query by hand, use the relationships on
the models to find the media_data. Is is made possible by
the BACKREF_NAME in each models.py, which lets us know the
local attr to ask for.
Also initialize the relationship attribute on new
media_data instead of the media_id. Also do not add it to
the session. This gives us:
- This automatically initializes the other side of the
relationship, which will allow later acces via that way.
- If the media_data is too early in the session, when the
(new) media_entry is not yet in there, this could get
conflicts. Avoid those by not adding to session.
- Uses cascading to commit media_data together with the
media_entry.
Elrond [Fri, 1 Feb 2013 18:57:39 +0000 (19:57 +0100)]
Some tests for media_data, yeah!
One in the submissions, that posts a jpg with gps data.
One in the modelmethods to test some behaviours.
The later test fails.
Fixes coming up.
Elrond [Thu, 31 Jan 2013 19:57:03 +0000 (20:57 +0100)]
Improve formatting for hook template docs.
Christopher Allan Webber [Thu, 31 Jan 2013 18:33:50 +0000 (12:33 -0600)]
Switching set syntax to python2.6 compatible
Christopher Allan Webber [Wed, 30 Jan 2013 19:27:40 +0000 (13:27 -0600)]
Added register_template_hooks and get_hook_templates to the plugin api
auto module documentation.
Christopher Allan Webber [Wed, 30 Jan 2013 19:27:05 +0000 (13:27 -0600)]
Even better documentation for get_hook_templates!
Tells how you *can* use it in templates if you really like.
Christopher Allan Webber [Wed, 30 Jan 2013 19:25:08 +0000 (13:25 -0600)]
Improved documentation for get_hook_templates, noting the template tag
Christopher Allan Webber [Wed, 30 Jan 2013 19:22:06 +0000 (13:22 -0600)]
Moved the docstring for the plugin template stuff from the class to module method
Christopher Allan Webber [Mon, 28 Jan 2013 20:41:01 +0000 (14:41 -0600)]
No need for an __init__ at all in the TemplateHookExtension, really.
Christopher Allan Webber [Mon, 28 Jan 2013 20:08:16 +0000 (14:08 -0600)]
Move template hook over to a template_hook tag. Seems to work! :)
Christopher Allan Webber [Mon, 28 Jan 2013 18:07:30 +0000 (12:07 -0600)]
Removing unused geolocation_map_visible variable and turning geolocation on in default config
Christopher Allan Webber [Mon, 28 Jan 2013 17:58:38 +0000 (11:58 -0600)]
Geolocation stuff, including including templates seems to be working-ish
- I'm having trouble seeing if the geolocation stuff actually works,
but plugins are included
- including a list of template hooks works, however the macro to
include them does not, so it's kinda verbose
Christopher Allan Webber [Fri, 25 Jan 2013 16:39:20 +0000 (10:39 -0600)]
Very start of plugin hooks and openstreetmap pluginification
- Added start of template hook code to pluginapi.py
- Started to break openstreetmap into plugin; moved templates
- Added plugin hooks in media and image media templates
... almost certainly, none of this works yet. :)
Elrond [Wed, 30 Jan 2013 14:03:04 +0000 (15:03 +0100)]
Better Py3 compat: d.has_key(k) -> k in d
py3 does not have dict.has_key any more. You have to use
"key in dict" instead. As that works in python2 as well,
let's use that.
Also some small bits of pep8.