mediagoblin.git
11 years agoMerge remote-tracking branch 'pythonsnake/537_version'
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

11 years agoFix deleting media with attachments.
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.

11 years agoFix errors in collection views
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.

11 years agoChange from email format in tag URI to domain format
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)

11 years agoAddress concerns in Issue #543
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.

11 years agoAdd markdown notice to collection description.
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.

11 years agoAdded "version" before the version
pythonsnake [Mon, 11 Feb 2013 15:57:33 +0000 (16:57 +0100)]
Added "version" before the version

11 years agoFixing MANIFEST.in: graft expects one directory per line
Christopher Allan Webber [Sun, 10 Feb 2013 19:49:35 +0000 (13:49 -0600)]
Fixing MANIFEST.in: graft expects one directory per line

11 years agoUpdating MANIFEST.in for more files... trying to make this work on pypi :)
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 :)

11 years agoTuned logging and added comments to 511 fix
Joar Wandborg [Sun, 10 Feb 2013 19:19:13 +0000 (20:19 +0100)]
Tuned logging and added comments to 511 fix

11 years agoFixed issue #511.
pythonsnake [Sun, 10 Feb 2013 10:43:18 +0000 (11:43 +0100)]
Fixed issue #511.

11 years agoFix bug 537
pythonsnake [Sun, 10 Feb 2013 11:01:24 +0000 (12:01 +0100)]
Fix bug 537

11 years agoMerge remote-tracking branch 'refs/remotes/elrond/sql/media_data'
Christopher Allan Webber [Sat, 9 Feb 2013 21:33:06 +0000 (15:33 -0600)]
Merge remote-tracking branch 'refs/remotes/elrond/sql/media_data'

11 years agoAdd type="text/javascript" for <script>.
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.

11 years agoAdd translation tags; remove unnecessary title attribute from link
Jef van Schendel [Fri, 8 Feb 2013 22:30:32 +0000 (23:30 +0100)]
Add translation tags; remove unnecessary title attribute from link

11 years agoRemove unused translation variable
Jef van Schendel [Fri, 8 Feb 2013 22:28:13 +0000 (23:28 +0100)]
Remove unused translation variable

11 years agoFix "Add to collection" button: remove icon, add text, add to collections.html
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

11 years agoRemove the collection counter because it's not needed
Jef van Schendel [Fri, 8 Feb 2013 21:08:17 +0000 (22:08 +0100)]
Remove the collection counter because it's not needed

11 years agoKill monkeypatching of ProcessingState.
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.

11 years agoAlso refactor "copy original into public storage".
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!

11 years agoUse ProcessingState for video.
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!

11 years agoProcessingState: Document monkey patching.
Elrond [Thu, 24 Jan 2013 09:23:38 +0000 (10:23 +0100)]
ProcessingState: Document monkey patching.

11 years agoImplement ProcessingState class and use for images
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.

11 years agoUse logging.config.fileConfig()
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.

11 years agoUse system wide EXIF package, if available.
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!

11 years agoCommitting extracted and compiled translations
Christopher Allan Webber [Tue, 5 Feb 2013 21:13:44 +0000 (15:13 -0600)]
Committing extracted and compiled translations

11 years agoCommitting present MediaGoblin translations before pushing extracted messages
Christopher Allan Webber [Tue, 5 Feb 2013 21:12:27 +0000 (15:12 -0600)]
Committing present MediaGoblin translations before pushing extracted messages

11 years agoRename {{title}} to {{media_title}}.
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.

11 years agoMark "Collection" for translation in media_collect.
Elrond [Tue, 5 Feb 2013 15:25:19 +0000 (16:25 +0100)]
Mark "Collection" for translation in media_collect.

11 years agoMerge remote-tracking branch 'aleksej/quotes_and_a_for_addcoll'
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

11 years agoSmall 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).

11 years agoIssue 621: Extract strings from hooked templates.
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.

11 years agoSearch for translation in all templates.
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.

11 years agoissue 615: config geolocation_map_visible gone.
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).

11 years agoDrop backward compatibility for media_data backref.
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.

11 years agoDrop media_data_table property.
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().

11 years agoTurn media.{backref_nam} from a list to a scalar.
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.

11 years agoRewrite media_data handling to use relationships
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.

11 years agoSome tests for media_data, yeah!
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.

11 years agoImprove formatting for hook template docs.
Elrond [Thu, 31 Jan 2013 19:57:03 +0000 (20:57 +0100)]
Improve formatting for hook template docs.

11 years agoSwitching set syntax to python2.6 compatible
Christopher Allan Webber [Thu, 31 Jan 2013 18:33:50 +0000 (12:33 -0600)]
Switching set syntax to python2.6 compatible

11 years agoAdded register_template_hooks and get_hook_templates to the plugin api
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.

11 years agoEven better documentation for get_hook_templates!
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.

11 years agoImproved documentation for get_hook_templates, noting the template tag
Christopher Allan Webber [Wed, 30 Jan 2013 19:25:08 +0000 (13:25 -0600)]
Improved documentation for get_hook_templates, noting the template tag

11 years agoMoved the docstring for the plugin template stuff from the class to module method
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

11 years agoNo need for an __init__ at all in the TemplateHookExtension, really.
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.

11 years agoMove template hook over to a template_hook tag. Seems to work! :)
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! :)

11 years agoRemoving unused geolocation_map_visible variable and turning geolocation on in defaul...
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

11 years agoGeolocation stuff, including including templates seems to be working-ish
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

11 years agoVery start of plugin hooks and openstreetmap pluginification
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. :)

11 years agoBetter Py3 compat: d.has_key(k) -> k in d
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.

11 years agoImprove runtime of one test.
Elrond [Tue, 29 Jan 2013 20:45:16 +0000 (21:45 +0100)]
Improve runtime of one test.

Do not commit so often. flushing is enough.

11 years agoFix issue 611: Proper (back)relationship on MediaComment.
Elrond [Tue, 29 Jan 2013 20:23:21 +0000 (21:23 +0100)]
Fix issue 611: Proper (back)relationship on MediaComment.

well, fix the relationship on the comments.

11 years agoFailing testcase for issue 611.
Elrond [Tue, 29 Jan 2013 20:13:49 +0000 (21:13 +0100)]
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.

11 years ago*docs* intersphinx, exception monitoring
Joar Wandborg [Sun, 27 Jan 2013 21:10:47 +0000 (22:10 +0100)]
*docs* intersphinx, exception monitoring

11 years agoDocs: Add a database guide to the plugin docs.
Elrond [Sat, 26 Jan 2013 18:21:40 +0000 (19:21 +0100)]
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.

11 years agoDocs: Create new area for developers.
Elrond [Sat, 26 Jan 2013 18:20:18 +0000 (19:20 +0100)]
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.

11 years agoAdd Trim whitespace plugin docs.
Elrond [Sat, 26 Jan 2013 12:03:54 +0000 (13:03 +0100)]
Add Trim whitespace plugin docs.

Added the documentation (which was already present in
plugindocs/) to the TOC, so it's getting build and linked.

11 years agoAllow doc string extraction and use for pluginapi.
Elrond [Fri, 25 Jan 2013 23:12:18 +0000 (00:12 +0100)]
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.

11 years agoUpdated video apt-get to not use glob
Joar Wandborg [Fri, 25 Jan 2013 20:43:49 +0000 (21:43 +0100)]
Updated video apt-get to not use glob

Also changed some literal blocks to code-blocks

11 years agoFix reference of get_test_app->get_app in test_modelmethods
Christopher Allan Webber [Fri, 25 Jan 2013 18:10:27 +0000 (12:10 -0600)]
Fix reference of get_test_app->get_app in test_modelmethods

(This changed in master while this test was being written; correcting
post-merge.)

11 years agoMerge branch '216_cwebber_style_unique_slugs'
Christopher Allan Webber [Fri, 25 Jan 2013 18:03:40 +0000 (12:03 -0600)]
Merge branch '216_cwebber_style_unique_slugs'

11 years agoNew mediaentry slug tests now pass!
Christopher Allan Webber [Wed, 23 Jan 2013 22:49:54 +0000 (16:49 -0600)]
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!

11 years agorequire mock for the new uuid-mocking tests
Christopher Allan Webber [Wed, 23 Jan 2013 22:47:30 +0000 (16:47 -0600)]
require mock for the new uuid-mocking tests

11 years agoWe don't want any empty string slugs, so make "" -> None
Christopher Allan Webber [Wed, 23 Jan 2013 22:40:39 +0000 (16:40 -0600)]
We don't want any empty string slugs, so make "" -> None

11 years agoSwitching uuid4()[1:4] -> uuid4().hex[:4]
Christopher Allan Webber [Wed, 23 Jan 2013 21:15:22 +0000 (15:15 -0600)]
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.

11 years agoUse better relationships to delete collections.
Elrond [Tue, 22 Jan 2013 21:00:41 +0000 (22:00 +0100)]
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.

11 years agoMade pil_filters a PIL_FILTERS (global)
Joar Wandborg [Tue, 22 Jan 2013 22:02:06 +0000 (23:02 +0100)]
Made pil_filters a PIL_FILTERS (global)

11 years agoChanged sampling filter default to AA
Joar Wandborg [Tue, 22 Jan 2013 21:54:10 +0000 (22:54 +0100)]
Changed sampling filter default to AA

11 years agoMade the image sampling filter configurable
Joar Wandborg [Tue, 22 Jan 2013 16:55:55 +0000 (17:55 +0100)]
Made the image sampling filter configurable

- Changed the default to BICUBIC instead of previous ANTIALIAS

11 years agoUse inspect_table; default user license==None.
Elrond [Tue, 22 Jan 2013 21:28:19 +0000 (22:28 +0100)]
Use inspect_table; default user license==None.

Use inspect_table in the new migration. Makes code more
readable, really.

And make the default for the preferred license be None.
This is a userspace thing, so we can even change the
migration here. Changing the migration means, that people
running the migration before this commit get a "" in
User.license_preference, while people running the migration
now get a None. Both values are okay.

None has been designated as "Use the site's default". We're
not actually having a site default right now. Which means
no license is selected in the dropdown.

While "" means "All rights reserved" being chosen by the
user.

Side note: Having no license being selected in the submit
dropdown is as "worse" as before and does not really hurt
much. MediaEntry.license==None means "All rights reserved"
as does "" also do.

11 years agouser.get('moo') -> user.moo
Sebastian Spaeth [Tue, 22 Jan 2013 21:18:08 +0000 (22:18 +0100)]
user.get('moo') -> user.moo

User fields are always existent, so there is no need to .get() them,
just use them directly.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoMerge remote-tracking branch 'refs/remotes/spaetz/521_license_preference' into mergetest
Christopher Allan Webber [Tue, 22 Jan 2013 19:43:02 +0000 (13:43 -0600)]
Merge remote-tracking branch 'refs/remotes/spaetz/521_license_preference' into mergetest

11 years agoMoved MediaComment form descriptions to apt. place
Joar Wandborg [Tue, 22 Jan 2013 13:38:53 +0000 (14:38 +0100)]
Moved MediaComment form descriptions to apt. place

11 years agoAlso set login_failed in case of form errors
Sebastian Spaeth [Mon, 21 Jan 2013 15:27:19 +0000 (16:27 +0100)]
Also set login_failed in case of form errors

If we send a POST request to the login page which contained form errors
(e.g. a too short password), the variable "login_failed" was not set to
true. This condition was tested by the test suite however, so we should
make sure that login_failed is set even if the form failed to validate.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoRestructure ForgotPassword view
Sebastian Spaeth [Mon, 7 Jan 2013 09:17:52 +0000 (10:17 +0100)]
Restructure ForgotPassword view

1) Remove mongo limitations (no 'or' when querying for either username
or email).

2) Lost password function revealed if an user name or email address
   is registered, which can be considered a data leak.
   Leaking user names is OK, they are public anyway, but don't reveal
   lookup success in case the lookup happened by email address.
   Simply respond: "If you have an account here, we have send you
                    your email"?

3) username and email search was case sensitive. Made username search
   case insensitive (they are always stored lowercase in the db).
   Keep email-address search case sensitive for now. This might need
   further discussion

4) Remove a whole bunch of indention in the style of:
   if no error:
        ...
        if no error:
            ...
            if no error:
                actually do something in the regular case

   by restructuring the function.

5) Outsource the sanity checking for username and email fields into the
   validator function. This way, we get automatic case sanity checking
   and sanitizing for all required fields.

6) Require 5-char password and fix tests

   Originally, the Change password form required a password between 6-30
   chars while the registration and login form did not require anything
   special. This commit introduces a common minimum limit for all forms
   which breaks the test suite which uses a 5 char password by
   default. :-).  As 5 chars seem sensible enough to enforce (people
   should be picking much longer ones anyway), just reduce the limit to
   5 chars, thereby making all tests pass.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoNormalize the email address in the same way in all places
Sebastian Spaeth [Mon, 7 Jan 2013 09:16:20 +0000 (10:16 +0100)]
Normalize the email address in the same way in all places

We were case normalizing the email address for registration, but not at
all for the forgotten password retrieval. Make a
tools.mail.normalize_email helper that can be used to normalize the
email in the same way in all places.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoMerge remote-tracking branch 'refs/remotes/spaetz/436_celery_push'
Christopher Allan Webber [Sun, 20 Jan 2013 19:13:39 +0000 (13:13 -0600)]
Merge remote-tracking branch 'refs/remotes/spaetz/436_celery_push'

11 years agoSanitize slug input on media edit
Sebastian Spaeth [Wed, 9 Jan 2013 11:38:08 +0000 (12:38 +0100)]
Sanitize slug input on media edit

Previously we allowed EVERYTHING, even slashes as slug when editing the media.
Make sure we slugify the input to sanitize it.

(+ string formdata is unicode, so there is no need to convert it)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoAdd (failing) test for editing the slug.
Elrond [Fri, 18 Jan 2013 20:17:52 +0000 (21:17 +0100)]
Add (failing) test for editing the slug.

This test fails, because it tries to set a slug with an "="
in it. And tests that the "=" gets replaced by "-".

Well, it currently is not being replaced.

The next (cherry picked) commit by Sebastian Spaeth fixes
this test!

11 years agoEnable foreign key checking on sqlite.
Elrond [Fri, 18 Jan 2013 17:42:52 +0000 (18:42 +0100)]
Enable foreign key checking on sqlite.

sqlite normally does not check foreign key referential
integrity. But it can do so.
So let's use it. Better safe than sorry.

11 years agoTurn comment list into a real <ul>.
Elrond [Fri, 18 Jan 2013 12:05:57 +0000 (13:05 +0100)]
Turn comment list into a real <ul>.

Well, I like semantic html. And the list of comments, well,
is now a list: <ul>.
Using list-style:none it looks nearly the same as before.

11 years agoAdd some simple collection test.
Elrond [Fri, 18 Jan 2013 10:42:56 +0000 (11:42 +0100)]
Add some simple collection test.

11 years agoRename get_test_app to get_app.
Elrond [Fri, 18 Jan 2013 10:40:40 +0000 (11:40 +0100)]
Rename get_test_app to get_app.

nosetests runs everything that even vaguely looks like a
test case... even our get_test_app. And as it is imported
everywhere... it is run everywhere as a test case. Renaming
it saves us about 10+ tests and a few seconds of time.

11 years agoRemove useless spaces in comment stuff.
Elrond [Thu, 17 Jan 2013 22:55:49 +0000 (23:55 +0100)]
Remove useless spaces in comment stuff.

When rendering a comment, we had a lot of whitespace. And
some of it made it into the rendered page:
"""<a href=...>abc </a>""" the trailing space gets
rendered and looks ugly.

11 years agoTranslate account deletion.
Elrond [Thu, 17 Jan 2013 22:54:48 +0000 (23:54 +0100)]
Translate account deletion.

Mark all the strings in the new account deletion stuff for
translation.

11 years agoFix linking to comments.
Elrond [Thu, 17 Jan 2013 22:50:51 +0000 (23:50 +0100)]
Fix linking to comments.

when linking to a comment in a MediaEntry, the page did not
contain a <a name="comment"> because, well:

We fetched a string comment-id from the routing. And the
pagination code tried to compare that to the int id on the
comment.

Fix is to let routing fetch an int from the url. Easy.

Relatedly remove duplicated comment_id fetching from the
URL in the view.

11 years agoMerge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Christopher Allan Webber [Thu, 17 Jan 2013 21:51:30 +0000 (15:51 -0600)]
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin

11 years agoReturn to media collection page if no collection selected
Sebastian Spaeth [Thu, 17 Jan 2013 21:37:41 +0000 (22:37 +0100)]
Return to media collection page if no collection selected

schendje rightly pointed out that we should not return to the media
homepage if we did not select a collection on the "collect" page, but
should actually return to the collect page.

This is an improvement of the user experience ;-)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoMove workbench into tools directory.
Elrond [Thu, 17 Jan 2013 21:10:43 +0000 (22:10 +0100)]
Move workbench into tools directory.

11 years agoRemove DEFAULT_WORKBENCH_DIR.
Elrond [Wed, 16 Jan 2013 18:50:48 +0000 (19:50 +0100)]
Remove DEFAULT_WORKBENCH_DIR.

We never used this.
Removed, as okayed by cwebber.

11 years agoMerge remote-tracking branch 'refs/remotes/spaetz/565_workbench_cleanup'
Christopher Allan Webber [Thu, 17 Jan 2013 21:02:52 +0000 (15:02 -0600)]
Merge remote-tracking branch 'refs/remotes/spaetz/565_workbench_cleanup'

11 years agoAdd a license preference field
Mark Holmquist [Sun, 11 Nov 2012 00:59:37 +0000 (16:59 -0800)]
Add a license preference field

This feature is absolutely necessary. Now a user can simply define
their default license and quickly go through a form, as opposed to
stopping to click on the select and choosing the same option over
and over again.

Also added DB migration for the field, so that's working now, too.

Rebased by Sebastian and made the default value to be unicode.

Reviewed-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoAdd "Browse collections" link to profile pages
Jef van Schendel [Thu, 17 Jan 2013 19:04:22 +0000 (20:04 +0100)]
Add "Browse collections" link to profile pages

11 years agoadding back dropdown.js now that we have, well, a dropdown again :)
Christopher Allan Webber [Thu, 17 Jan 2013 17:53:32 +0000 (11:53 -0600)]
adding back dropdown.js now that we have, well, a dropdown again :)

11 years agoMerge remote-tracking branch 'refs/remotes/origin/533-new-dropdown'
Christopher Allan Webber [Thu, 17 Jan 2013 17:47:29 +0000 (11:47 -0600)]
Merge remote-tracking branch 'refs/remotes/origin/533-new-dropdown'

Conflicts:
mediagoblin/templates/mediagoblin/base.html
mediagoblin/templates/mediagoblin/root.html

11 years agoMerge commit '9408938' from 565_workbench_cleanup (spaetz)
Christopher Allan Webber [Thu, 17 Jan 2013 17:12:13 +0000 (11:12 -0600)]
Merge commit '9408938' from 565_workbench_cleanup (spaetz)

11 years agoCSS edits to dropdown menu; added log out button for unverified users
Jef van Schendel [Thu, 17 Jan 2013 15:15:03 +0000 (16:15 +0100)]
CSS edits to dropdown menu; added log out button for unverified users

11 years agoChange position of "Delete account" link, put it below the form
Jef van Schendel [Thu, 17 Jan 2013 12:35:45 +0000 (13:35 +0100)]
Change position of "Delete account" link, put it below the form

11 years agoBetter "delete my account" placement
Sebastian Spaeth [Thu, 17 Jan 2013 11:47:38 +0000 (12:47 +0100)]
Better "delete my account" placement

Improve the "delete my account" link location by not placing it outside the
main content bar. It still might require more tweaks.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>