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
cf41e7d744
Improve formatting for hook template docs.
2013-01-31 20:58:19 +01:00
Christopher Allan Webber
8a4d0dbc07
Switching set syntax to python2.6 compatible
2013-01-31 12:33:50 -06:00
Christopher Allan Webber
75621003af
Added register_template_hooks and get_hook_templates to the plugin api
...
auto module documentation.
2013-01-30 13:27:40 -06:00
Christopher Allan Webber
ec553298ff
Even better documentation for get_hook_templates!
...
Tells how you *can* use it in templates if you really like.
2013-01-30 13:27:05 -06:00
Christopher Allan Webber
f097cf648c
Improved documentation for get_hook_templates, noting the template tag
2013-01-30 13:25:20 -06:00
Christopher Allan Webber
08f3966d54
Moved the docstring for the plugin template stuff from the class to module method
2013-01-30 13:22:19 -06:00
Christopher Allan Webber
46da25827f
No need for an __init__ at all in the TemplateHookExtension, really.
2013-01-30 13:22:19 -06:00
Christopher Allan Webber
927be5e8ca
Move template hook over to a template_hook tag. Seems to work! :)
2013-01-30 13:22:19 -06:00
Christopher Allan Webber
e9c3384b84
Removing unused geolocation_map_visible variable and turning geolocation on in default config
2013-01-30 13:22:18 -06:00
Christopher Allan Webber
a3f811a6e8
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
2013-01-30 13:22:18 -06:00
Christopher Allan Webber
1c2d01ae3b
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. :)
2013-01-30 13:22:18 -06:00
Elrond
04453ccf42
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.
2013-01-30 15:03:04 +01:00
Elrond
3f931680e3
Improve runtime of one test.
...
Do not commit so often. flushing is enough.
2013-01-29 21:45:16 +01:00
Elrond
ff68ca9fc2
Fix issue 611: Proper (back)relationship on MediaComment.
...
well, fix the relationship on the comments.
2013-01-29 21:23:21 +01:00
Elrond
e9b4e50007
Failing testcase for issue 611.
...
This currently fails (with foreign key constrain error):
1. Have user A and B.
2. User B creates media M.
3. User A post a comment on M.
4. User A deletes his own account.
The test is a little bit wider.
2013-01-29 21:13:49 +01:00
Joar Wandborg
f8107ccccc
*docs* intersphinx, exception monitoring
2013-01-27 22:10:47 +01:00
Elrond
ae9f0aec38
Docs: Add a database guide to the plugin docs.
...
Plugin writers will often need to create new tables. So
give them some hints, what they need to do and where they
might find more info.
2013-01-26 19:38:52 +01:00
Elrond
3214c653dd
Docs: Create new area for developers.
...
We need some "Part" for developers. Currently, it's named
"Part 4: Developer's Zone". But we should come up with a
better name soon.
Moved the codebase docs in there for starters.
2013-01-26 19:20:18 +01:00
Elrond
b238a95464
Add Trim whitespace plugin docs.
...
Added the documentation (which was already present in
plugindocs/) to the TOC, so it's getting build and linked.
2013-01-26 13:03:54 +01:00
Elrond
92c597ca1c
Allow doc string extraction and use for pluginapi.
...
Allow us to extract docstrings from our sources using the
sphinx.ext.autodoc module.
First use: Extract some of the docs for the pluginapi and
provide it in a new "Plugin API" section.
2013-01-26 00:15:57 +01:00
Joar Wandborg
3a8b18f85b
Updated video apt-get to not use glob
...
Also changed some literal blocks to code-blocks
2013-01-25 21:43:49 +01:00
Christopher Allan Webber
d5600aa75c
Fix reference of get_test_app->get_app in test_modelmethods
...
(This changed in master while this test was being written; correcting
post-merge.)
2013-01-25 12:10:27 -06:00
Christopher Allan Webber
c7d135b6ea
Merge branch '216_cwebber_style_unique_slugs'
2013-01-25 12:03:40 -06:00
Christopher Allan Webber
a81082fcaf
New mediaentry slug tests now pass!
...
- fixed some issues with "whacking uuid junk on the slug"
- uuid4() -> uuid.uuid4() so that mock will work right
- added all the tests!
2013-01-23 16:49:54 -06:00
Christopher Allan Webber
394a4a37f7
require mock for the new uuid-mocking tests
2013-01-23 16:47:30 -06:00
Christopher Allan Webber
b0118957ff
We don't want any empty string slugs, so make "" -> None
2013-01-23 16:40:39 -06:00
Christopher Allan Webber
266b42b3dc
Switching uuid4()[1:4] -> uuid4().hex[:4]
...
.hex is what we need to access to get at the ascii (hex) version
anyway. Also, not sure why the previous version grabbed starting at
the index of 1... just grab the first characters instead.
2013-01-23 15:15:22 -06:00
Elrond
6194344bf9
Use better relationships to delete collections.
...
When deleting a User, his/her collections can be deleted by
sqlalchemy: Collections do not need any special code to be
executed on deletion.
2013-01-23 17:36:03 +01:00
Joar Wandborg
d63cc34e71
Made pil_filters a PIL_FILTERS (global)
2013-01-22 23:28:17 +01:00
Joar Wandborg
124081040b
Changed sampling filter default to AA
2013-01-22 23:28:17 +01:00
Joar Wandborg
7cd7db5af4
Made the image sampling filter configurable
...
- Changed the default to BICUBIC instead of previous ANTIALIAS
2013-01-22 23:28:17 +01:00