15 Commits

Author SHA1 Message Date
Elrond
6603b30041 Merge remote branch 'remotes/manolinux/671_spaces_in_tag_list_edit'
* remotes/manolinux/671_spaces_in_tag_list_edit:
  * Feature #678: Drop custom delimiters in tags   * Eliminate the definition of the tag delimiter for tests.   * Remove a test that was related to custom tags delimiter. * Bug #671: Tags list on Edit page is not seperated by spaces and hard to read   * Modify a test to include this space.
  * Bug #671: Tags list on Edit page is not seperated by spaces and hard to read : Make 'media_tags_as_string' function put a space after each comma. * Feature #678: Drop custom delimiters in tags : I declare a constant in the begining of text.py file.
2011-12-03 22:11:54 +01:00
Elrond
71c6c432a5 Bug #685: only provide CSRF token if it exists
This was suggested by Nathan Yergler in the bug logs.
Just implementing it.

- Let render_csrf_form_token return None, if the CSRF_TOKEN
  is not available in the environ, because the
  process_request part of the meddleware has not yet run.

- In render_template: If the returned value from above is
  None, then do not add the csrf_token to the templates
  context.
2011-12-03 21:25:55 +01:00
Christopher Allan Webber
c7e1fee1b8 Should be 404 for 404s, not 400 :) 2011-12-01 16:58:56 -06:00
Manuel Urbano Santos
3038ba87e4 * Bug #671: Tags list on Edit page is not seperated by spaces and hard to read : Make 'media_tags_as_string' function put a space after each comma.
* Feature #678: Drop custom delimiters in tags : I declare a constant in the begining of text.py file.
2011-11-27 13:49:47 +01:00
Christopher Allan Webber
ce5ae8da19 Rename MediaGoblin middleware to meddleware to avoid confusion w/ wsgi middleware
hehehehehe, "meddleware"
2011-11-25 12:13:56 -06:00
Christopher Allan Webber
53bc39755b Add app_config and global_config to the template environment 2011-11-19 08:33:29 -06:00
Christopher Allan Webber
6950c6c77c Adding app_config and global_config to the template environment 2011-11-19 08:31:37 -06:00
Elrond
eabe6b678a Dot-Notation for "_id"
Note: Migrations can't use "Dot Notation"!

Migrations run on pymongo, not mongokit.
So they can't use the "Dot Notation".
This isn't really a big issue, as migrations are anyway
quite mongo specific.
2011-11-15 11:32:13 +01:00
Christopher Allan Webber
ee91c2b88d Merge remote-tracking branch 'remotes/nyergler/pep8-ification'
Conflicts:
	mediagoblin/db/migrations.py
	mediagoblin/db/models.py
	mediagoblin/user_pages/views.py
	mediagoblin/util.py
2011-11-13 20:23:26 -06:00
Christopher Allan Webber
4715091970 Support for older webobs and newer webobs both in accept language mess :) 2011-10-15 16:57:45 -05:00
Christopher Allan Webber
ed59426466 Fixes issue662, MediaGoblin was broken by recent WebOb release.
From WebOb release notes:

  "Accept.best_matches() is gone; use list(request.accept) or
  request.accept.best_match(..) instead (applies to all Accept-*
  headers) or similar with request.accept_language."

... seems that's what borked it...
2011-10-15 16:46:04 -05:00
Elrond
05788ef450 i592: Use full path in various places
When running mediagoblin in a sub path on a web server,
most things inside mediagoblin need the "inside path", but
when generating URLs for the webbrowser, full paths are
needed.

urlgen and routes already do that.

Some (mostly pagination and login) need the URL of the
current page. They used request.path_info. But this is the
"inside" path, not the full.

So now there is request.full_path and its used in various
places.
2011-10-03 14:01:13 +02:00
Christopher Allan Webber
b43b17fc26 Merge remote branch 'remotes/aaronw/bug444_fix_utils_py_redux'
Conflicts:
	mediagoblin/util.py
2011-10-01 21:27:36 -05:00
Aaron Williamson
03ae172a60 Finished splitting util.py into separate files. 2011-10-01 18:05:17 -04:00
Aaron Williamson
ae3bc7fabf Moved common, translation, template, and url code out of util.py and into tools/[file].py 2011-10-01 09:31:42 -04:00