Transition away from webob.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
import uuid
import datetime
-from webob import exc
-
from mediagoblin import messages
from mediagoblin import mg_globals
from mediagoblin.tools.response import render_to_response, redirect, render_404
request.session.save()
if request.form.get('next'):
- return exc.HTTPFound(location=request.form['next'])
+ return redirect(request, location=request.form['next'])
else:
return redirect(request, "index")
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from webob import exc
from cgi import FieldStorage
from datetime import datetime
media.save()
- return exc.HTTPFound(
- location=media.url_for_self(request.urlgen))
+ return redirect(request,
+ location=media.url_for_self(request.urlgen))
if request.user.is_admin \
and media.uploader != request.user.id \
% (request.form['attachment_name']
or request.files['attachment_file'].filename))
- return exc.HTTPFound(
- location=media.url_for_self(request.urlgen))
+ return redirect(request,
+ location=media.url_for_self(request.urlgen))
return render_to_response(
request,
'mediagoblin/edit/attachments.html',
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from webob import exc
import logging
import datetime
media_uploader.wants_comment_notification):
send_comment_email(media_uploader, comment, media, request)
- return exc.HTTPFound(
- location=media.url_for_self(request.urlgen))
+ return redirect(request, location=media.url_for_self(request.urlgen))
@get_user_media_entry
messages.add_message(
request, messages.ERROR,
_("The media was not deleted because you didn't check that you were sure."))
- return exc.HTTPFound(
- location=media.url_for_self(request.urlgen))
+ return redirect(request,
+ location=media.url_for_self(request.urlgen))
if ((request.user.is_admin and
request.user.id != media.uploader)):