Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8543363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:17:03+00:00 2026-06-11T12:17:03+00:00

Plone views support setting return code on the HTTP response by mutation http://collective-docs.readthedocs.org/en/latest/serving/http_request_and_response.html#return-code …

  • 0

Plone views support setting return code on the HTTP response by mutation

http://collective-docs.readthedocs.org/en/latest/serving/http_request_and_response.html#return-code

… however does there exist anything Pyramid/Django style where one could return human-readable HTTP error codes from your browser view. Along the lines:

class View(BrowserView):

    def __call__(self):
        # Any nice classes to return here?
        return Forbidden("Sauna area is forbidden due to on-going repairement work")

Also i am aware of that you can throw zException but that results to “We are sorry, there seems to be…” page on the user. I just want to short plain-text info to the browser.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:17:04+00:00Added an answer on June 11, 2026 at 12:17 pm

    No, apart from raising the zException built-in exceptions and calling self.request.response.setStatus(), there is no other way for influencing the status code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have configured Plone with the following buildout (via http://build.pythonpackages.com/buildout/plone/4.2.x ): [buildout] allow-hosts =
Trying to run z3c.form.testing based code on Plone 4.1 and getting this exception Traceback
I'm currently in the process of setting up my plone site to show expiration
In Plone 2, there were icons for print, fullscreen and email in object views.
Plone has a neat categorization feature of content using tags and a tag cloub.
I'm using plone and trying to display a form result in a page template.
I'm uprading to Plone 4 from 3.3.5 and using webcouturier.dropdownmenu 2.3. With Plone 3.3.5
I have 3 Plone 4.1.4 sites under the same zope instance with the same
When using page translations in Plone (v4) with LinguaPlone product (v4.1.2), links to all
We need to schedule some tasks in Plone 4 (notify users after n days

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.