25 Commits

Author SHA1 Message Date
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
Aaron Williamson
152a3bfaa3 Finished splitting util.py into separate files. 2011-10-01 18:05:44 -04:00
Will Kahn-Greene
12a100e4d8 508. Updates copyright/license information 2011-09-01 20:50:19 -04:00
Christopher Allan Webber
53c5e0b028 Also allow admins to delete other users' media. 2011-08-30 22:37:54 -05:00
Joar Wandborg
502073f2bf Feature #403 - Ability to delete media entries - Fixes according to feedback
*   Moved `mediagoblin.confirm` stuff to `mediagoblin.user_pages`,
    templates too.
*   Removed route extension for `mediagoblin.confirm`
*   Created `delete_media_files` which deletes all media files
    on the public_store when the entry is deleted
*   Created a new decorator to check if a user has the permission
     to delete an entry.
2011-08-30 23:16:46 +02:00
Christopher Allan Webber
de12b4e773 Use render_404 EVERYWHERE! 2011-08-20 15:57:24 -05:00
Christopher Allan Webber
d43b472a08 require_active_login now redirect's to user's homepage if not email verified 2011-07-29 08:05:57 -05:00
Elrond
3efdd97c2e Move InvalidId to db.util
Instead of import InvalidId from the low level bson module,
first import it in our db.util wrapper and second import it
from pymongo.errors.
2011-06-20 00:09:40 +02:00
Elrond
9150244afa Create redirect shortcut and use it around
This is just replacing exc.HTTPFound(location=request.urlgen(...))
by redirect(request, ...). No magic.
2011-06-05 16:16:03 +02:00
Elrond
7fd6f623f1 Merge remote branch 'upstream/master'
Conflicts:
	mediagoblin/templates/mediagoblin/user_pages/media.html
2011-06-02 14:41:50 +02:00
Christopher Allan Webber
a72c504b25 Just adjusting some spacing so we don't go over 80 chars 2011-05-31 19:30:05 -05:00
Aleksandar Micovic
bcec749b52 Fixed bug where someone who wasn't logged in was asked to verify
their emails.
2011-05-31 15:26:00 -04:00
Aleksandar Micovic
28afb47ca8 Added a temporary verification page informing the user they need
to authenticate.
2011-05-30 23:51:30 -04:00
Elrond
aba81c9f20 Starting "edit" functionality.
This adds a link to the "edit" form, the form, the view for
displaying the form and that's about it.
2011-05-26 23:09:33 +02:00
Christopher Allan Webber
16509be160 Update all the views so that they use the uploader reference instead
of uploader embedding
2011-05-22 16:06:45 -05:00
Christopher Allan Webber
01674e105c Make sure that a MediaEntry does belong to this appropriate user in
the decorator.  (Thanks Elrond)
2011-05-20 19:12:32 -05:00
Christopher Allan Webber
439e37f732 Cosmetic changes: removed an unused import, stripped some trailing whitespace. 2011-05-20 17:48:43 -05:00
Christopher Allan Webber
724933b154 MediaEntry slugs usable in URLs, & decorator that grabs media from the request 2011-05-20 17:47:36 -05:00
Christopher Allan Webber
3c2567ac76 Adjusting spacing a little bit 2011-05-20 17:37:50 -05:00
Christopher Allan Webber
90bdf3428f pass in page number in uses_pagination view via keyword argument so ordering doesn't matter. 2011-05-20 17:36:29 -05:00
Christopher Allan Webber
1301a8ad57 Reorganizing the uses_pagination decorator a little and having it pass
in the page number to the view
2011-05-19 22:39:15 -05:00
Bernhard Keller
3eb6fc4f2f moved check for correct page values into decorator for view function 2011-05-19 22:52:18 +02:00
Christopher Allan Webber
e745ce10c9 we should check for request.user['status'] not request.user['session'], clearly. 2011-04-23 11:30:20 -05:00
Christopher Allan Webber
7eba0306d8 Provide a next= url when we require logging in 2011-04-23 08:46:02 -05:00
Christopher Allan Webber
bb3eaf20ea New requires_active_login decorator! 2011-04-19 19:04:22 -05:00