2844 Commits

Author SHA1 Message Date
Elrond
d647b62699 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.
2013-02-22 14:23:16 +01:00
Christopher Allan Webber
aa9ac2b287 Merge remote-tracking branch 'aleksej/632_config_spec_comment_typo' 2013-02-21 17:58:27 -06:00
Christopher Allan Webber
b9d1d13743 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!
2013-02-21 16:29:16 -06:00
Christopher Allan Webber
631784a2d7 Making the tags on media pages point to the user's tag listing specifically.
This commit sponsored by Torsten Meissner.  Thanks, Torsten!
2013-02-21 16:19:43 -06:00
Christopher Allan Webber
38905733e8 Fixing user gallery tags filter to be on slug rather than name.
This commit sponsored by Kat Walsh.  Thanks, Kat!
2013-02-21 16:13:56 -06:00
Christopher Allan Webber
60a7eb9ca5 Merge remote-tracking branch 'refs/remotes/spaetz/WIP/user_tag_gallery' 2013-02-21 15:55:26 -06:00
Runar Petursson
9b2cd962af 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.
2013-02-20 23:41:36 +01:00
Elrond
155438cdc1 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.
2013-02-19 17:44:04 +01:00
Elrond
0c8073a3a3 Merge remote-tracking branch 'pythonsnake/537_version'
* pythonsnake/537_version:
  Added "version" before the version
  Fix bug 537
2013-02-19 13:34:13 +01:00
Elrond
df5b142ab9 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.
2013-02-18 14:55:42 +01:00
Joar Wandborg
61e39d90e5 Fix errors in collection views
When a collection does not exist, render the 404 page.
2013-02-18 14:41:34 +01:00
Joar Wandborg
ab9b0b4175 Change from email format in tag URI to domain format
Also fixed a bug (thanks pyflakes)
2013-02-13 23:12:55 +01:00
Joar Wandborg
19ad2e0cd0 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.
2013-02-13 22:23:27 +01:00
pythonsnake
dc000b70ff Mention mediagoblin/config_spec.ini 2013-02-13 16:56:24 +01:00
Elrond
b4ea20fa98 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.
2013-02-13 00:02:56 +01:00
pythonsnake
1bd9ee4112 Added "version" before the version 2013-02-11 16:57:33 +01:00
Christopher Allan Webber
fc6616ed26 Fixing MANIFEST.in: graft expects one directory per line 2013-02-10 13:49:35 -06:00
Christopher Allan Webber
140f703fc4 Updating MANIFEST.in for more files... trying to make this work on pypi :) 2013-02-10 13:48:18 -06:00
Joar Wandborg
8d355df617 Tuned logging and added comments to 511 fix 2013-02-10 20:19:13 +01:00
pythonsnake
34c35c8cec Fixed issue #511. 2013-02-10 20:11:47 +01:00
pythonsnake
6f6471aa5e Fix bug 629 2013-02-10 15:08:15 +01:00
pythonsnake
2a0aed84a6 Fix bug 537 2013-02-10 12:01:24 +01:00
Aleksej
cd3058373c correct typo in a comment in config_spec.ini 2013-02-10 14:13:46 +04:00
Christopher Allan Webber
591c116098 Merge remote-tracking branch 'refs/remotes/elrond/sql/media_data' 2013-02-09 15:33:06 -06:00
Elrond
742bfa7a77 Add type="text/javascript" for <script>.
Our jquery <script> tag did not have a proper type
attribute.
2013-02-09 11:34:57 +01:00
Jef van Schendel
867f9acdc3 Add translation tags; remove unnecessary title attribute from link 2013-02-08 23:30:32 +01:00
Jef van Schendel
b78843a840 Remove unused translation variable 2013-02-08 23:28:13 +01:00
Jef van Schendel
44004c17e3 Fix "Add to collection" button: remove icon, add text, add to collections.html 2013-02-08 22:54:16 +01:00
Jef van Schendel
252de2b857 Remove the collection counter because it's not needed 2013-02-08 22:08:17 +01:00
Elrond
fb46fa663d Kill monkeypatching of ProcessingState.
And change the process_foo() API to accept a
processingstate now.

image and video are tested, the others are UNTESTED.
2013-02-08 10:09:37 +01:00
Elrond
715ea49546 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!
2013-02-08 10:09:37 +01:00
Elrond
bfd68cce85 Use ProcessingState for video.
Rewrite video to use the new ProcessingState.

Thanks to Joar Wandborg for testing!
2013-02-08 10:09:37 +01:00
Elrond
e382792637 ProcessingState: Document monkey patching. 2013-02-08 10:09:37 +01:00
Elrond
93b14fc300 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.
2013-02-08 10:05:42 +01:00
Joar Wandborg
9d7c69fb74 Use logging.config.fileConfig()
Instead of the monster I had built before.
2013-02-07 22:35:42 +01:00
Elrond
657a463799 Use system wide EXIF package, if available.
Created and tested by Simon Fondrie-Teitler.

Thanks!
2013-02-07 00:31:37 +01:00
Christopher Allan Webber
d9b59fc6e1 Committing extracted and compiled translations 2013-02-05 15:13:44 -06:00
Christopher Allan Webber
cd2def45fa Committing present MediaGoblin translations before pushing extracted messages 2013-02-05 15:12:27 -06:00
Elrond
8c659fd95c 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.
2013-02-05 16:52:13 +01:00
Elrond
accb073e8c Mark "Collection" for translation in media_collect. 2013-02-05 16:25:19 +01:00
Elrond
414ba21fda Merge remote-tracking branch 'aleksej/quotes_and_a_for_addcoll'
* aleksej/quotes_and_a_for_addcoll:
  Small changes to "Add <media> to collection" string
2013-02-04 21:26:09 +01:00
Aleksej
b79a1fa925 Small changes to "Add <media> to collection" string
Add quotation marks and "a" ("a" was proposed by Elrond).
2013-02-05 00:07:47 +04:00
Elrond
bee998d5fd 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.
2013-02-04 17:11:01 +01:00
Elrond
a2ec25e3d1 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.
2013-02-04 14:19:42 +01:00
Elrond
c9abf931cb 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).
2013-02-02 20:40:19 +01:00
Elrond
485404a9c4 Drop backward compatibility for media_data backref.
Now we only support media_type backrefs with uselist=False.
2013-02-01 22:02:35 +01:00
Elrond
139c6c099f 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().
2013-02-01 22:02:35 +01:00
Elrond
1f268deda4 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.
2013-02-01 22:02:35 +01:00
Elrond
57f8d263e1 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.
2013-02-01 22:02:35 +01:00
Elrond
d728c636b9 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.
2013-02-01 22:02:29 +01:00